1
0
mirror of https://github.com/go-micro/go-micro.git synced 2024-11-24 08:02:32 +02:00

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