mirror of
https://github.com/oauth2-proxy/oauth2-proxy.git
synced 2026-10-04 13:41:18 +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
@@ -253,6 +253,42 @@ var _ = Describe("Headers Suite", func() {
|
||||
},
|
||||
expectedErr: "",
|
||||
}),
|
||||
|
||||
Entry("with flattenHeaders (set-cookie and any other)", headersTableInput{
|
||||
headers: []options.Header{
|
||||
{
|
||||
Name: "Set-Cookie",
|
||||
Values: []options.HeaderValue{
|
||||
{
|
||||
SecretSource: &options.SecretSource{
|
||||
Value: []byte("_oauth2_proxy=ey123123123"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "X-Auth-User",
|
||||
Values: []options.HeaderValue{
|
||||
{
|
||||
SecretSource: &options.SecretSource{
|
||||
Value: []byte("oauth_user"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
initialHeaders: http.Header{
|
||||
"Set-Cookie": []string{"cookie1=value1", "cookie2=value2"},
|
||||
"X-Auth-User": []string{"oauth_user_1"},
|
||||
},
|
||||
|
||||
expectedHeaders: http.Header{
|
||||
"Set-Cookie": []string{"cookie1=value1", "cookie2=value2", "_oauth2_proxy=ey123123123"},
|
||||
"X-Auth-User": []string{"oauth_user_1,oauth_user"},
|
||||
},
|
||||
expectedErr: "",
|
||||
}),
|
||||
|
||||
Entry("with a claim valued header", headersTableInput{
|
||||
headers: []options.Header{
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user