chore: Fix golangci-lint 2.12.1 findings (#7690)

This commit is contained in:
Zen Dodd 2026-05-07 17:40:26 +10:00 committed by GitHub
parent c7c9f3108a
commit d2172bea61
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 31 additions and 16 deletions

View file

@ -664,10 +664,12 @@ func (s CookieHashSelection) Select(pool UpstreamPool, req *http.Request, w http
return upstream
}
cookie := &http.Cookie{
Name: s.Name,
Value: sha,
Path: "/",
Secure: false,
Name: s.Name,
Value: sha,
Path: "/",
Secure: false,
HttpOnly: true,
SameSite: http.SameSiteLaxMode,
}
isProxyHttps := false
if trusted, ok := caddyhttp.GetVar(req.Context(), caddyhttp.TrustedProxyVarKey).(bool); ok && trusted {