git.iko.soy/typeable/oauth2-proxy
on master help sign in
Oversize Cookie Alert

Cookies cannot be larger than 4kb

commit3379e05fec7adb2d69bb35560434c2ed1167a371 authorBrian Dwyer <bdwyer@ieee.org> dateThu 23 Feb 2017, 18:48 (10 years ago) parent89ba1d8
1 file changed+4
oauthproxy.go+4
oauthproxy.go+4
@@ -255,6 +255,10 @@ func (p *OAuthProxy) MakeCookie(req *http.Request, value string, expiration time
255255
256256 if value != "" {
257257 value = cookie.SignedValue(p.CookieSeed, p.CookieName, value, now)
258+ if len(value) > 4096 {
259+ // Cookies cannot be larger than 4kb
260+ log.Printf("WARNING - Cookie Size: %d bytes", len(value))
261+ }
258262 }
259263 return &http.Cookie{
260264 Name: p.CookieName,