Unable to set CORS rules programatically
See original GitHub issueIn order to push to a storage queue from another origin, i need to add the appropriate CORS rule. At start up i try to set this programatically for the queue service…
const properties = {
Cors: {
CorsRule: [{
AllowedOrigins: ['*'],
AllowedMethods: ['POST', 'GET', 'HEAD', 'PUT'],
AllowedHeaders: ['*'],
ExposedHeaders: ['*'],
MaxAgeInSeconds: 3600
}]
}
}
qService.setServiceProperties(properties, function (error) {
if (error) {
throw error
}
})
This fails with the following error…
StorageError: Not Implemented yet.
at Function.StorageServiceClient._normalizeError (~/dev/_spikes-poc/sas/server/node_modules/azure-storage/lib/common/services/storageserviceclient.js:1160:12)
at QueueService.StorageServiceClient._processResponse (~/dev/_spikes-poc/sas/server/node_modules/azure-storage/lib/common/services/storageserviceclient.js:744:50)
at Request.processResponseCallback [as _callback] (~/dev/_spikes-poc/sas/server/node_modules/azure-storage/lib/common/services/storageserviceclient.js:317:37)
at Request.self.callback (~/dev/_spikes-poc/sas/server/node_modules/request/request.js:185:22)
at emitTwo (events.js:126:13)
at Request.emit (events.js:214:7)
at Request.<anonymous> (~/dev/_spikes-poc/sas/server/node_modules/request/request.js:1157:10)
at emitOne (events.js:116:13)
at Request.emit (events.js:211:7)
at IncomingMessage.<anonymous> (~/dev/_spikes-poc/sas/server/node_modules/request/request.js:1079:12)
I also tried hitting the associated rest endpoints, but get 501 not implemented…
GET /devstoreaccount1?restype=service&comp=properties HTTP/1.1
501: Not Implemented
PUT /devstoreaccount1?restype=service&comp=properties HTTP/1.1
501: Not Implemented
Is there another convention for setting CORS rules in Azurite?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:4
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Using cross-origin resource sharing (CORS)
The subtopics describe how you can enable CORS using the Amazon S3 console, or programmatically by using the Amazon S3 REST API and...
Read more >Why does my JavaScript code receive a "No 'Access-Control ...
The error you get is due to the CORS standard, which sets some restrictions on how JavaScript can perform ajax requests ...
Read more >Fixing "No 'Access-Control-Allow-Origin' Header Present"
This error occurs when a script on your website/web app attempts to make a request to a resource that isn't configured to accept...
Read more >Enable Cross-Origin Requests (CORS) in ASP.NET Core
When the [EnableCors] attribute is applied to a controller, page model, or action method, and CORS is enabled in middleware, both policies are ......
Read more >Configure cross-origin resource sharing (CORS) | Cloud Storage
Configure CORS on a bucket. You set a CORS configuration on a bucket by specifying information, such as HTTP methods and originating domains,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi Guys, CORS support in Azurite V3 is planned in the incoming roadmap before V3 GA.
@swimhiking You issue might not be same issue as before. Would you please open a new issue by following the issue template (especially give the debug log of Azurite), and we can look deeper into it.