@@ -253,6 +253,42 @@ var _ = Describe("Headers Suite", func() {
254 expectedErr: "",
254 expectedErr: "",
257+ Entry("with flattenHeaders (set-cookie and any other)", headersTableInput{
258+ headers: []options.Header{
261+ Values: []options.HeaderValue{
263+ SecretSource: &options.SecretSource{
264+ Value: []byte("_oauth2_proxy=ey123123123"),
270+ Name: "X-Auth-User",
271+ Values: []options.HeaderValue{
273+ SecretSource: &options.SecretSource{
274+ Value: []byte("oauth_user"),
280+ initialHeaders: http.Header{
281+ "Set-Cookie": []string{"cookie1=value1", "cookie2=value2"},
282+ "X-Auth-User": []string{"oauth_user_1"},
285+ expectedHeaders: http.Header{
286+ "Set-Cookie": []string{"cookie1=value1", "cookie2=value2", "_oauth2_proxy=ey123123123"},
287+ "X-Auth-User": []string{"oauth_user_1,oauth_user"},
256 Entry("with a claim valued header", headersTableInput{
292 Entry("with a claim valued header", headersTableInput{
257 headers: []options.Header{
293 headers: []options.Header{