fix: use httponly flag on coder_signed_app_token cookie (#18989)

This commit is contained in:
Dean Sheather
2025-07-22 22:44:20 +10:00
committed by GitHub
parent c4b69bbe63
commit 62dc8310d1
+5 -4
View File
@@ -77,10 +77,11 @@ func ResolveRequest(rw http.ResponseWriter, r *http.Request, opts ResolveRequest
// For subdomain apps, this applies to the entire subdomain, e.g.
// app--agent--workspace--user.apps.example.com
http.SetCookie(rw, opts.CookieCfg.Apply(&http.Cookie{
Name: codersdk.SignedAppTokenCookie,
Value: tokenStr,
Path: appReq.BasePath,
Expires: token.Expiry.Time(),
Name: codersdk.SignedAppTokenCookie,
Value: tokenStr,
Path: appReq.BasePath,
HttpOnly: true,
Expires: token.Expiry.Time(),
}))
return token, true