Hi,
I am hosting a few fonts for my Django application on spaces. They were working ok for a little bit but now I get this error:
has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
How do I fix this? I have set the CORS policy on Spaces for this bucket as follows:
Origin: https://*.ondigitalocean.app
Allowed Method: GET HEAD
I do not know what to do with allowed headers. Any help would be much appreciated.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
I do not currently have a domain attatched to the app as it’s still in development. As soon as its finished I’ll set it to one. for now I’m using randomlink.ondigitalocean.app which is why I set it to *.ondigitalocean.app.
Hi there,
It seems like you have the correct CORS policy for the origin and allowed methods, but you might be missing the required headers.
What I could suggest is to try and add the appropriate Access-Control-Allow-Headers for your DigitalOcean Spaces bucket"
https://*.ondigitalocean.appGET, HEADContent-Type, Origin, AcceptLet me know how it goes!
For more information about this you can check out the documentation here:
https://docs.digitalocean.com/products/spaces/how-to/configure-cors/
Best,
Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.