Fix - Refresh Session not working for multiple cookies (#1209) (#1227)

* 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:
Rishi Kambil
2021-06-09 10:22:33 +01:00
committed by GitHub
co-authored by Joel Speed Rishi Kambil
parent cfd82daaf0
commit 41cd418a5d
3 changed files with 39 additions and 2 deletions
+2 -1
View File
@@ -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, ","))
}
}