Skip to content
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

Update nginx config to set origin and hide allow origin from backends #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

marcolarosa
Copy link

Hi,

Thanks for the repo! I've just changed the origin from wildcard to $http_origin so it matches whatever comes through and allows setting 'Access-Control-Allow-Credentials' which doesn't work with wildcard origins. Also, I hide the origin header sent by the backend so it doesn't clash with what's happening here.

If any backend returns Access-Control-Allow-Origin we end up with a
header with multiple values and that's not allowed or makes sense so we
have to ensure we hide it.

Also, we need to the origin to an actual domain in order to send
credentials. Credentials are not allowed with wildcard.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant