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

Add CORS support #34

Closed
m1h43l opened this issue Nov 6, 2018 · 8 comments
Closed

Add CORS support #34

m1h43l opened this issue Nov 6, 2018 · 8 comments

Comments

@m1h43l
Copy link
Collaborator

m1h43l commented Nov 6, 2018

Many JavaScript application need CORS support for their REST services if JSONP is not used.

@NielsLiisberg
Copy link
Collaborator

But CORS is just headers - You can add as manu you like. What am I missing?

@m1h43l
Copy link
Collaborator Author

m1h43l commented Mar 22, 2019

The problem is that there is currently no API to add HTTP headers to the response. I once started it but failed due to the string handling in C. #19 is still open.

@m1h43l
Copy link
Collaborator Author

m1h43l commented Mar 22, 2019

In the first step we could add the default CORS headers for making the REST service available for everybody. But in the second step we need to add some configuration who may use the REST service and the plugin should then add the corresponding CORS headers if the requestor is valid.

@m1h43l
Copy link
Collaborator Author

m1h43l commented Mar 22, 2019

This means that we need to make the configuration available to the plugins and servlets (perhaps via a noxdb graph).

@m1h43l
Copy link
Collaborator Author

m1h43l commented Mar 22, 2019

Same problems with the BasicAuth plugin. We need to have the realm configurable and the possibility to add HTTP headers to the response.

@m1h43l
Copy link
Collaborator Author

m1h43l commented Mar 22, 2019

There is another open issue #11 which could help with this.
Why not having separate programs for loading the configuration (different implemenation: json, yaml, database, rest service). The program could build the noxdb graph and pass it to the ileastic service:

il_setConfiguration(configuration pointer);

@m1h43l
Copy link
Collaborator Author

m1h43l commented Aug 23, 2020

If #85 is done then we could implement end point specific CORS header because we can identify the endpoint in the plugin.

@m1h43l
Copy link
Collaborator Author

m1h43l commented Oct 7, 2020

CORS support was added with pull request #93

@m1h43l m1h43l closed this as completed Oct 7, 2020
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

2 participants