fix(auth): update SameSite cookie policy description for clarity

This commit is contained in:
GitHub Actions
2026-03-15 03:23:06 +00:00
parent f33ab83b7c
commit fd58f9d99a

View File

@@ -128,7 +128,8 @@ func isLocalRequest(c *gin.Context) bool {
// setSecureCookie sets an auth cookie with security best practices
// - HttpOnly: prevents JavaScript access (XSS protection)
// - Secure: true for HTTPS; false for local/private network HTTP requests
// - SameSite: Strict for HTTPS, Lax for HTTP/IP to allow forward-auth redirects
// - SameSite: Lax for any local/private-network request (regardless of scheme),
// Strict otherwise (public HTTPS only)
func setSecureCookie(c *gin.Context, name, value string, maxAge int) {
scheme := requestScheme(c)
secure := true