Skip to content

Commit

Permalink
feature/cloudfront/sign: support SameSite option
Browse files Browse the repository at this point in the history
  • Loading branch information
shogo82148 committed Feb 2, 2024
1 parent 599392a commit 0a879a6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions feature/cloudfront/sign/sign_cookie.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ const (
// A CookieOptions optional additional options that can be applied to the signed
// cookies.
type CookieOptions struct {
Path string
Domain string
Secure bool
Path string
Domain string
Secure bool
SameSite http.SameSite
}

// apply will integration the options provided into the base cookie options
Expand Down Expand Up @@ -237,6 +238,7 @@ func createCookies(p *Policy, keyID string, privKey *rsa.PrivateKey, opt CookieO
c.Path = opt.Path
c.Domain = opt.Domain
c.Secure = opt.Secure
c.SameSite = opt.SameSite
}

return cookies, nil
Expand Down

0 comments on commit 0a879a6

Please sign in to comment.