[go: up one dir, main page]

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

REST API CORS support #17

Open
softwaretailoring opened this issue Jan 5, 2021 · 0 comments
Open

REST API CORS support #17

softwaretailoring opened this issue Jan 5, 2021 · 0 comments

Comments

@softwaretailoring
Copy link

I built my own Docker image as suggested in #14.
Now I can use the REST API without the Internal Server Error.
However, there is a CORS issue.

When I tried an API call via Ajax request I got the following error:

Access to XMLHttpRequest at 'http://localhost:5000/tok/morph/pos/conv-morph/dep' from origin 'https://localhost:44399' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

I can solve it with a new Docker build with modified uwsgi.ini.
I've added this line:

add-header = Access-Control-Allow-Origin: https://localhost:44399

Do you want to provide CORS support? Maybe in a configurable manner?

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