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

Allow Multiple Domains in CORS Whitelist #24

Open
hhff opened this issue Jun 23, 2015 · 0 comments
Open

Allow Multiple Domains in CORS Whitelist #24

hhff opened this issue Jun 23, 2015 · 0 comments

Comments

@hhff
Copy link
Owner

hhff commented Jun 23, 2015

From stack overflow:
http://stackoverflow.com/questions/17323350/access-control-allow-origin-with-multiple-domains

There can only be one Access-Control-Allow-Origin response header, and that header can only have one origin value. Therefore, in order to get this to work, you need to have some code that:

Grabs the Origin request header.
Checks if the origin value is one of the whitelisted values.
If it is valid, sets the Access-Control-Allow-Origin header with that value.
I don't think there's any way to do this solely through the web.config.

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

No branches or pull requests

1 participant