Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevented recovery middleware from printing stack #821

Merged
merged 1 commit into from
May 15, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion services/secure-gateway/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ func newApp(config *appConfig.Configuration) http.Handler {
authenticationMiddleware := security.AuthenticationMiddleware(&config.Security, auditor)
authorizationMiddleware := security.AuthorizationMiddleware(enforcer, auditor)

middleware := negroni.New(negroni.NewRecovery())
recovery := negroni.NewRecovery()
recovery.PrintStack = false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is an open issue about this
urfave/negroni#214
So I think it will be redundant.
Good for now.

middleware := negroni.New(recovery)
middleware.Use(authenticationMiddleware)
middleware.Use(authorizationMiddleware)

Expand Down