Skip to content

Commit

Permalink
fix: Missing SameSite attribute on options
Browse files Browse the repository at this point in the history
  • Loading branch information
jaitaiwan committed Aug 20, 2024
1 parent a56e60c commit 6eef180
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions cookie.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ func newCookieFromOptions(name, value string, options *Options) *http.Cookie {
Secure: options.Secure,
HttpOnly: options.HttpOnly,
Partitioned: options.Partitioned,
SameSite: options.SameSite,
}

}
9 changes: 6 additions & 3 deletions options.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

package sessions

import "net/http"

// Options stores configuration for a session or session store.
//
// Fields are a subset of http.Cookie fields.
Expand All @@ -14,8 +16,9 @@ type Options struct {
// deleted after the browser session ends.
// MaxAge<0 means delete cookie immediately.
// MaxAge>0 means Max-Age attribute present and given in seconds.
MaxAge int
Secure bool
HttpOnly bool
MaxAge int
Secure bool
HttpOnly bool
Partitioned bool
SameSite http.SameSite
}

0 comments on commit 6eef180

Please sign in to comment.