Static serving disabled

This commit is contained in:
Asim Aslam 2020-04-19 20:30:38 +01:00
parent 53db26a614
commit c4acf3c2cb

View File

@ -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)
}