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

CORS error when trying to fetch the DB dumps #558

Closed
raphodn opened this issue Nov 11, 2024 · 2 comments · Fixed by #564
Closed

CORS error when trying to fetch the DB dumps #558

raphodn opened this issue Nov 11, 2024 · 2 comments · Fixed by #564
Labels

Comments

@raphodn
Copy link
Member

raphodn commented Nov 11, 2024

What

On a reuse project I'm trying to fetch the locations.jsonl.gz file from a Frontend.
But fetch gives me a CORS error.

Is this something that we need to configure in nginx.conf ?
Similar to the /img config in that file for instance ?

Related issues

@raphodn
Copy link
Member Author

raphodn commented Nov 13, 2024

@raphael0202 i need help 🙏

@raphael0202
Copy link
Contributor

@raphodn You need to add CORS headers directive to /data here:

                # Add CORS headers
                add_header 'Access-Control-Allow-Origin' '*';
                add_header 'Access-Control-Allow-Methods' 'GET, OPTIONS';
                add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range';
                add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range';

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants