Skip to content

Commit

Permalink
Merge pull request #90 from xy-planning-network/dlk/cookie-same-site
Browse files Browse the repository at this point in the history
http/session/store: set cookie SameSite=Strict
  • Loading branch information
DavidLarsKetch authored Oct 31, 2024
2 parents 71b38df + e3ad53f commit 59b7724
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion http/session/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,9 @@ func NewStoreService(cfg Config) (Service, error) {
}

c.Options.Domain = cfg.Domain
c.Options.Secure = !(s.env.IsDevelopment() || s.env.IsTesting())
c.Options.HttpOnly = true
c.Options.SameSite = http.SameSiteStrictMode
c.Options.Secure = !(s.env.IsDevelopment() || s.env.IsTesting())
c.MaxAge(cfg.MaxAge)

s.store = c
Expand Down

0 comments on commit 59b7724

Please sign in to comment.