mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-24 09:18:31 +02:00
feat(fileserver): add rules support for fileservers
This commit is contained in:
@@ -86,6 +86,10 @@ func (s *FileServer) Start(parent task.Parent) gperr.Error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if len(s.Rules) > 0 {
|
||||||
|
s.handler = s.Rules.BuildHandler(s.handler.ServeHTTP)
|
||||||
|
}
|
||||||
|
|
||||||
if s.UseHealthCheck() {
|
if s.UseHealthCheck() {
|
||||||
s.HealthMon = monitor.NewFileServerHealthMonitor(s.HealthCheck, s.Root)
|
s.HealthMon = monitor.NewFileServerHealthMonitor(s.HealthCheck, s.Root)
|
||||||
if err := s.HealthMon.Start(s.task); err != nil {
|
if err := s.HealthMon.Start(s.task); err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user