diff options
Diffstat (limited to 'service/static/service.go')
-rw-r--r-- | service/static/service.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/service/static/service.go b/service/static/service.go index 2cb419fe..b824e787 100644 --- a/service/static/service.go +++ b/service/static/service.go @@ -45,12 +45,17 @@ func (s *Service) middleware(f http.HandlerFunc) http.HandlerFunc { func (s *Service) handleStatic(w http.ResponseWriter, r *http.Request) bool { fPath := path.Clean(r.URL.Path) - if s.cfg.Forbids(fPath) { + if s.cfg.AlwaysForbid(fPath) { return false } f, err := s.root.Open(fPath) if err != nil { + if s.cfg.AlwaysServe(fPath) { + w.WriteHeader(404) + return true + } + return false } defer f.Close() |