-
-
Notifications
You must be signed in to change notification settings - Fork 67
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
CORS Support #141
Comments
Option#3 seems the most flexible. My second choice would be Option#2. |
@psiservices-dharrison Good question.
Resgate could verify that the See: https://stackoverflow.com/questions/1653308/access-control-allow-origin-multiple-origin-domains I think I prefer that option. |
Enforced content-type for same-origin setting.
Resolved in #149 |
Issue
Resgate should have a configuration to enable CORS support for the REST API.
Solution
Alternative 1: Simple CORS setting
A boolean flag
--cors
would enable the adding of the HTTP header to the REST API:This would cover the most common use case.
Alternative 2: Allow Origin setting
A string flag
--alloworigin https://resgate.io
would enable the adding of the HTTP header, but with a custom origin:This would allow for a more flexible configuration.
Alternative 3: Header setting
A repeatable string flag that allows custom headers to be added to the response:
This would allow full flexibility, while making it less obvious how to add CORS support.
Note: Added headers should be applied for both WS and HTTP, while the Access-Control-Allow-Origin header may be skipped on WS responses.
The text was updated successfully, but these errors were encountered: