-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Request: enable multiple origins in CORS plugin #1043
Comments
Not currently planned, doing so would require doing some matching on the origin of the request, as in the specification the A few common suggestions are to do a regex check against the origin as I also suggest above. Adding this as a note for anyone who is interested in patching the CORS plugin to provide this functionality, as I am unsure whether such a possibility is possible from within the plugin itself. Doing some digging you could emulate this common suggestion using Thoughts? |
I think that being able to configure the |
@jmdacruz +1 We are having issues because we need to allow credentials from multiple domains :( |
@thefosk would love to have this as a feature too. Any implementation suggestions to work around for now? |
👍 |
I was thinking to add a new configuration property to the plugin, called something like Or Does this make sense? |
The plugin would definitely need some sort of whitelist of I would do something like this:
So, you would end up with a configuration such as:
Where What I like about this approach is that it can be used with a basic list of domains in scenarios where you can easily enumerate them, but you also have the power to use regex when needed. It also avoids the need of a boolean flag completely, and it remains backwards compatible with applications from a registration point of view. Ultimately, you could consider avoiding the |
We have been using our own custom plugin as specified in #1774 , where we just have a configured list of domains to allow, for a while now (about 8 months). There is a concern where this list becomes massive. Would love to see this supported so we don't have to update ours every time kong updates the cors plugin. |
Agree, looking forward for support for multiple domains for CORS in the plugin. |
This was done in #2203! |
Hi,
I've a question (or request... ;))
Is planned to enhance the CORS plugin to allow multiple origins?
At the moment I can add only one origin, or the "*" for allow all.
Thanks.
The text was updated successfully, but these errors were encountered: