Skip to content
This repository has been archived by the owner on May 19, 2020. It is now read-only.

Commit

Permalink
Work-around Session Filestore fallback bug
Browse files Browse the repository at this point in the history
gorilla Session creation isn't handled correctly when MaxAge is unset. Work
around upstream bug[1] by explicitly setting MaxAge.

[1] gorilla/sessions#96
  • Loading branch information
adborden committed Jan 13, 2017
1 parent 8bae770 commit f533296
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions helpers/settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@ func (s *Settings) InitSettings(envVars EnvVars, env *cfenv.App) error {
store.MaxLength(4096 * 4)
store.Options = &sessions.Options{
HttpOnly: true,
// TODO remove this; work-around for
// https://github.com/gorilla/sessions/issues/96
MaxAge: 60 * 60 * 24 * 7,
Secure: s.SecureCookies,
}
s.Sessions = store
Expand Down

0 comments on commit f533296

Please sign in to comment.