Return 404 for service endpoints when service listing is disabled, upgrade docker base images

This commit is contained in:
Brendan C. Ward 2020-12-17 14:38:16 -08:00
parent ca4a94e0c5
commit 07d552cdcb
No known key found for this signature in database
GPG Key ID: 37A8A7A2D61DFE13
2 changed files with 6 additions and 2 deletions

View File

@ -1,5 +1,5 @@
# Stage 1: compile mbtileserver
FROM golang:1.14-alpine
FROM golang:1.15-alpine3.12
WORKDIR /
RUN apk add git build-base
@ -9,7 +9,7 @@ RUN GOOS=linux go build -o /mbtileserver
# Stage 2: start from a smaller image
FROM alpine:3.11
FROM alpine:3.12
WORKDIR /

View File

@ -248,10 +248,14 @@ func (s *ServiceSet) Handler() http.Handler {
if s.enableServiceList {
m.HandleFunc(s.rootURL.Path, s.serviceListHandler)
} else {
m.Handle(s.rootURL.Path, http.NotFoundHandler())
}
if s.enableArcGIS {
m.HandleFunc(ArcGISRoot, s.tilesetHandler)
} else {
m.Handle(ArcGISRoot, http.NotFoundHandler())
}
return m