1
0
mirror of https://github.com/oauth2-proxy/oauth2-proxy.git synced 2025-08-13 20:13:07 +02:00

Merge pull request #346 from bdwyertech/patch-1

Oversize Cookie Alert
This commit is contained in:
Jehiah Czebotar
2017-03-28 21:40:11 -04:00
committed by GitHub

View File

@@ -257,6 +257,10 @@ func (p *OAuthProxy) MakeCookie(req *http.Request, value string, expiration time
if value != "" {
value = cookie.SignedValue(p.CookieSeed, p.CookieName, value, now)
if len(value) > 4096 {
// Cookies cannot be larger than 4kb
log.Printf("WARNING - Cookie Size: %d bytes", len(value))
}
}
return &http.Cookie{
Name: p.CookieName,