Skip to content
This repository was archived by the owner on May 21, 2025. It is now read-only.

Conversation

@jancona
Copy link
Contributor

@jancona jancona commented Aug 4, 2020

Issue #, if available:
None, but I can create one if necessary.

Description of changes:
We were seeing duplicated CORS headers in our app, which caused the browser to not allow the connection. The problem appears to be caused by code which puts the response headers in both Headers and MultiValueHeaders. According to the docs:

If you specify values for both headers and multiValueHeaders, API Gateway merges them into a single list. If the same key-value pair is specified in both, only the values from multiValueHeaders will appear in the merged list.

So this may be a Lambda bug. But I can't see any reason to populate both maps and this patch appears to fix the duplicate headers.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@krotscheck
Copy link

Created issue #75 for ya. I have no control over merging this though :(

@krotscheck
Copy link

@sapessi - Could we get this merged?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants