Report this

What is the reason for this report?

Spaces CORS does not expose headers

Posted on August 12, 2018

I have been using Spaces in replace of S3 for a while. I am using custom metadata. The retrieval of my custom metadata is fine if I get the objects via either java AWS SDK or AWS CLI. However I cannot get it via javascript running on a domain. I have configured CORS for the bucket and notice that Digital Ocean does not provide a place to enter the ExposeHeaders configuration, which enable S3 CORS to return custom metadata for the objects. I even attempted to set the ExposeHeader myself for my bucket using AWS CLI, something like: aws --endpoint-url https://sgp1.digitaloceanspaces.com s3api put-bucket-cors --bucket mybucket --cors-configuration file://cors.json the cors.json file contains my settings for ExposeHeaders

getting back the CORS from DigitalOcean shows that my settings was saved, with the ExposeHeaders aws --endpoint-url https://sgp1.digitaloceanspaces.com s3api get-bucket-cors --bucket

However, there is still no metadata or any extra headers in my cross domain response . The only headers presented for my objects are: content-type and last-modified.

Is this a missing configuration on DO side? Thanks and regards, Nghia



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!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Having the same problem.

I’m configuring ExposeHeaders “Location” and “ETag” and expecting these back in the form-based upload response.

same problem here, would be nice to get an answer from DO.

We’re having this issue as well. It’s causing a lot of issues in trying to create a client side tool that synchronizes project files onto our spaces, as none of the S3 tools or documentation seem to work correctly here.

The developer cloud

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

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.