mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix: use httponly flag on coder_signed_app_token cookie (#18989)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user