H-263 restore PostgreSQL E2E coverage (#41)
Co-authored-by: Rogee <rogee@ipao.vip>
This commit is contained in:
@@ -199,6 +199,14 @@ func setCSRFTokenCookie(c *gin.Context, token string, cfg CSRFConfig) {
|
||||
if maxAge <= 0 {
|
||||
maxAge = 3600
|
||||
}
|
||||
switch strings.ToLower(cfg.CookieSameSite) {
|
||||
case "lax":
|
||||
c.SetSameSite(http.SameSiteLaxMode)
|
||||
case "none":
|
||||
c.SetSameSite(http.SameSiteNoneMode)
|
||||
default:
|
||||
c.SetSameSite(http.SameSiteStrictMode)
|
||||
}
|
||||
|
||||
c.SetCookie(
|
||||
cfg.CookieName,
|
||||
|
||||
Reference in New Issue
Block a user