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 file headers are absent #86

Open
michaeliwaikato opened this issue Oct 13, 2020 · 1 comment
Open

CORS file headers are absent #86

michaeliwaikato opened this issue Oct 13, 2020 · 1 comment

Comments

@michaeliwaikato
Copy link

The CORS header configuration is absent and prevents files accessed using CORS. A simple fix for this is to add the following to the api_site settings.py file:

CORS_ALLOW_HEADERS = [ 'accept', 'accept-encoding', 'authorization', 'content-type', 'content-disposition', 'dnt', 'origin', 'user-agent', 'x-csrftoken', 'x-requested-with', ]

The headers specified are all of the defaults found here and the addition of the "content-disposition" header item is what makes the file access work with CORS.

@michaeliwaikato
Copy link
Author

This was tested working for commit #3e3ee37 but seems to break for the latest commit #93dcfe6. I am not sure where the break occurs.

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