mirror of
https://github.com/go-micro/go-micro.git
synced 2024-12-24 10:07:04 +02:00
Static serving disabled
This commit is contained in:
parent
53db26a614
commit
c4acf3c2cb
@ -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)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user