Skip to content
This repository has been archived by the owner on Mar 22, 2018. It is now read-only.

CORS - Enabling the allowing of origins so BLOBS can be displayed from browsers #156

Closed
jimmacb opened this issue Feb 14, 2018 · 2 comments
Assignees

Comments

@jimmacb
Copy link

jimmacb commented Feb 14, 2018

I have looked through the code and I can't easily see how I can configure Access-Control-Allow-Origin: header on responses so I can test local browser selections for unsecured / public blobs.

Any ideas as this would normally be achieved by setting the blob service properties which aren't currently implemented?

Thanks

@arafato
Copy link
Owner

arafato commented Feb 14, 2018

Hi @jimmacb ! This feature is currently not supported by Azurite. Happy to implement it and put it on top of the backlog. Expect a working version within the next few days, will update you here.

@arafato arafato self-assigned this Feb 16, 2018
arafato added a commit that referenced this issue Feb 16, 2018
arafato added a commit that referenced this issue Feb 16, 2018
arafato added a commit that referenced this issue Feb 16, 2018
arafato added a commit that referenced this issue Feb 16, 2018
arafato added a commit that referenced this issue Feb 16, 2018
arafato added a commit that referenced this issue Feb 16, 2018
arafato added a commit that referenced this issue Feb 17, 2018
arafato added a commit that referenced this issue Feb 17, 2018
arafato added a commit that referenced this issue Feb 17, 2018
arafato added a commit that referenced this issue Feb 17, 2018
arafato added a commit that referenced this issue Feb 17, 2018
arafato added a commit that referenced this issue Feb 18, 2018
@arafato
Copy link
Owner

arafato commented Feb 18, 2018

@jimmacb just released v1.9.1 which brings support for Get/Set StorageServiceProperties, Preflight Request, and CORS support. So you need to activate CORS via an according call to SetStorageServiceProperties (https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-service-properties). Then, once you set the origin header on your request, the response will include headers like access-control-allow-origin etc. (if a match with the specified CORS rules is found).
Let me know if it works for you.

@arafato arafato closed this as completed Feb 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants