mirror of
https://github.com/kataras/iris.git
synced 2025-12-18 02:17:05 +00:00
new Timeout, TimeoutMessage configuration fields and apps.OnApplicationRegistered listener
This commit is contained in:
5
iris.go
5
iris.go
@@ -640,6 +640,11 @@ func (app *Application) Build() error {
|
||||
return err
|
||||
}
|
||||
app.HTTPErrorHandler = routerHandler
|
||||
|
||||
if app.config.Timeout > 0 {
|
||||
app.Router.SetTimeoutHandler(app.config.Timeout, app.config.TimeoutMessage)
|
||||
}
|
||||
|
||||
// re-build of the router from outside can be done with
|
||||
// app.RefreshRouter()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user