mirror of
https://github.com/TwiN/gatus.git
synced 2024-11-07 08:34:15 +01: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
@ -22,7 +22,9 @@ func CreateRouter(staticFolder string, securityConfig *security.Config, uiConfig
|
||||
if err := securityConfig.RegisterHandlers(router); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
securityConfig.ApplySecurityMiddleware(protected)
|
||||
if err := securityConfig.ApplySecurityMiddleware(protected); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
// Endpoints
|
||||
unprotected.Handle("/v1/config", ConfigHandler{securityConfig: securityConfig}).Methods("GET")
|
||||
|
Loading…
Reference in New Issue
Block a user