-
-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#185 ALB/ELB set cookies when multiValueHeaders is not set #186
#185 ALB/ELB set cookies when multiValueHeaders is not set #186
Conversation
…ue headers is not set
"headers": { | ||
"content-type": "text/plain; charset=utf-8", | ||
"set-cookie": "cookie1=cookie1; Secure", | ||
"Set-cookie": "cookie2=cookie2; Secure", | ||
}, | ||
"multiValueHeaders": {}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only one of headers and multiValueHeaders should be specified
"You must use multiValueHeaders if you have enabled multi-value headers and headers otherwise"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The documentation you linked makes it sound like all headers should be in multiValueHeaders, even those with a single value, if it is enabled.
I'm not sure if 0.11.0 did this or did what the current "main" branch does and only send the headers that have multiple values in multiValueHeaders.
I think using one or the other may be the way to go, it's a bit easier to understand what is going on, and is how the ALB documentation reads online. Let us know what AWS says if anything.
if multi_value_headers: | ||
event["multiValueHeaders"] = {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
again this specifies headers and multiValueHeaders
The use of different case to send multiple headers makes me a little nervous. |
Thanks @nathanglover for the PR and @jurasofish for the discussion. Regarding the headers in the response, there was a previous PR (ultimately not merged) where this was discussed and the user reached the similar conclusion of this PR, so I think I will merge it but we can revisit later specifically if there are issues. |
…ue headers is not set (jordaneremieff#186)
I believe this fixes #185 by adding back the code used in 0.11.0.
Let me know if anything else should be added or removed.