mirror of
https://github.com/TwiN/gatus.git
synced 2024-12-14 11:58:04 +00:00
fix(security): Make sure to panic on start if the security middlewares return an error
This commit is contained in:
parent
f6f7e15735
commit
9cb8c37298
1 changed files with 3 additions and 1 deletions
|
@ -22,7 +22,9 @@ func CreateRouter(staticFolder string, securityConfig *security.Config, uiConfig
|
||||||
if err := securityConfig.RegisterHandlers(router); err != nil {
|
if err := securityConfig.RegisterHandlers(router); err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
securityConfig.ApplySecurityMiddleware(protected)
|
if err := securityConfig.ApplySecurityMiddleware(protected); err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// Endpoints
|
// Endpoints
|
||||||
unprotected.Handle("/v1/config", ConfigHandler{securityConfig: securityConfig}).Methods("GET")
|
unprotected.Handle("/v1/config", ConfigHandler{securityConfig: securityConfig}).Methods("GET")
|
||||||
|
|
Loading…
Reference in a new issue