fix require auth middleware
continuous-integration/drone/push Build is passing Details

main
Drew Bednar 2 months ago
parent 98ba3cc681
commit e9232a0838

@ -8,10 +8,11 @@ import (
func addBaseMiddleware(app *RatchetApp, next http.Handler, requireAuth bool) http.Handler {
var h http.Handler
h = next
if requireAuth {
h = RequireAuthenticationMiddleware(next, app.sessionManager)
h = RequireAuthenticationMiddleware(h, app.sessionManager)
}
h = AuthenticateMiddleware(next, app.sessionManager, app.userService)
h = AuthenticateMiddleware(h, app.sessionManager, app.userService)
h = NoSurfMiddleware(h)
h = app.sessionManager.LoadAndSave(h)
return h

Loading…
Cancel
Save