Report this

What is the reason for this report?

Rails ActiveStorageDigitalOcean Spaces CORS

Posted on April 13, 2019

I’m getting a CORS error when trying to upload an image to DigitalOcean Spaces, despite it working fine in development and test.

The error is as follows:

Access to XMLHttpRequest at 'https://vglist.sfo2.digitaloceanspaces.com/KaRtoiMSiLxFpJGQHg8ZrXrC' from origin 'https://vglist.co' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.