OVH Community

Welcome to your community space. Ask questions, search for information, post content, and interact with other OVH Community members.

CORS in Object Storage


#1

Hello,

how can I configure CORS in Object Storage? The aws s3api put-bucket-cors seems to not be supported:

 aws s3api put-bucket-cors --bucket bucket-name --cors-configuration file://cors.json --endpoint-url=https://s3.waw.cloud.ovh.net

An error occurred (NotImplemented) when calling the PutBucketCors operation: The requested resource is not implemented

#2

With openstack:

openstack container set --property Access-Control-Allow-Headers='Content-Type, X-CSRFToken' name_of_container
openstack container set --property Access-Control-Allow-Origin='https://domain1.com https://domain2.com' name_of_container

#3

This post was flagged by the community and is temporarily hidden.


#4

This post was flagged by the community and is temporarily hidden.


#5

Hi folks,

Quick up on the post, I’ve been trying the commands that @AlexD2 posted, but it doesn’t work on my end.

I’m using the S3 endpoints with Laravel, and when I try to load a PDF, my console shows a warning about CORS not being set.

Access to fetch at ‘XXXXXX’ from origin ‘XXXXXX’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. If an opaque response serves your needs, set the request’s mode to ‘no-cors’ to fetch the resource with CORS disabled.

Am I doing something wrong?