Skip to content

Commit

Permalink
Merge pull request #3 from richard-cox/fix-http-only
Browse files Browse the repository at this point in the history
Ensure HttpOnly, Secure and Domain are set for new sessions
  • Loading branch information
nwmac committed Aug 24, 2018
2 parents ea2757e + 3e1c1ba commit 7d2ab22
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions sqlitestore.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,11 @@ func (m *SqliteStore) Get(r *http.Request, name string) (*sessions.Session, erro
func (m *SqliteStore) New(r *http.Request, name string) (*sessions.Session, error) {
session := sessions.NewSession(m, name)
session.Options = &sessions.Options{
Path: m.Options.Path,
MaxAge: m.Options.MaxAge,
Domain: m.Options.Domain,
HttpOnly: m.Options.HttpOnly,
MaxAge: m.Options.MaxAge,
Path: m.Options.Path,
Secure: m.Options.Secure,
}
session.IsNew = true
var err error
Expand Down

0 comments on commit 7d2ab22

Please sign in to comment.