mirror of
https://github.com/oauth2-proxy/oauth2-proxy.git
synced 2026-09-30 11:41:19 +02:00
* Fix - Refresh Session not working for multiple cookies (#1209) * added comments for flattenheaders fix Co-authored-by: Joel Speed <Joel.speed@hotmail.co.uk> * Updated Changelog.md Co-authored-by: Rishi Kambil <rishi.kambil@lntinfotech.com> Co-authored-by: Joel Speed <Joel.speed@hotmail.co.uk>
This commit is contained in:
co-authored by
Joel Speed
Rishi Kambil
parent
cfd82daaf0
commit
41cd418a5d
@@ -43,7 +43,8 @@ func newStripHeaders(headers []options.Header) alice.Constructor {
|
||||
|
||||
func flattenHeaders(headers http.Header) {
|
||||
for name, values := range headers {
|
||||
if len(values) > 1 {
|
||||
// Set-Cookie should not be flattened, ref: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie
|
||||
if len(values) > 1 && name != "Set-Cookie" {
|
||||
headers.Set(name, strings.Join(values, ","))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user