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:
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