-
Notifications
You must be signed in to change notification settings - Fork 234
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
Access to XMLHttpRequest has been blocked by CORS policy. #204
Comments
Have you tried checking the IAM access policies for your bucket? I don't think it's a CORS issue, but rather an access one. Also, try adding the region to the endpoint: |
Yes I have but still the same issue |
I have the same problem too, maybe anyone can have suggestions? |
I am getting intermittent CORS Failed issues too. I have reviewed the differences between those requests that pass and fail and cannot see a difference. UPDATE After significant further investigation, I have found that this is related to an issue between the method used to provide AWS credentials to s3direct. To test my theory, I SSH'd into the ec2 instance and provided the same IAM user I was employing in dev and the problem disappeared. I have checked over the S3, django settings and IAM roles repeatedly to ensure I have followed the direction and do not have inconsistencies between dev and staging and am now convinced this is either a s3direct or boto3/aws issue. I would LOVE it if someone had the answer! Or they could tell me what I'm likely doing wrong. Shall I move this to a new issue? |
As a fix I have used a IAM user (via env vars) instead of the role, which has fixed the issue. I am happy to make a PR for the readme to suggest a ec2 instance role is not the best course if files are 400mb+. However I don't have a specifc explanation as I don't fully understand where the problem lies within the process so will not be able to pack up the explanation with much detail. Please let me know if you would like me to do this. |
Try -for test purpose- in the CORSConfiguration: Also: the endpoint might be wrong. Do not use 's3', use 'glacier', e.g.: Check this list of endpoints: |
I have raised a new issue cause the origin is not going to the s3
#168 (comment)
The same issue persists even after we did all of these
S3 cors settings
My settings.py
The text was updated successfully, but these errors were encountered: