From c4acf3c2cb9490b06ccb33d81a29d0e336af0ebe Mon Sep 17 00:00:00 2001 From: Asim Aslam Date: Sun, 19 Apr 2020 20:30:38 +0100 Subject: [PATCH] Static serving disabled --- web/service.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/web/service.go b/web/service.go index 069a53e2..a06d7782 100644 --- a/web/service.go +++ b/web/service.go @@ -316,6 +316,13 @@ func (s *service) HandleFunc(pattern string, handler func(http.ResponseWriter, * }) } + // disable static serving + if pattern == "/" { + s.Lock() + s.static = false + s.Unlock() + } + s.mux.HandleFunc(pattern, handler) }