Is OPTIONS HTTP method supported on Azure CDN?

Miguel Garcia Lopez 0 Reputation points
2023-03-16T12:39:22.29+00:00

We have an Microsoft CDN (classic) Endpoint setup backed by a Storage Blob Container.

Whenever an OPTIONS request is issued (due to a browser dealing with CORS), we are getting a 405 (method not allowed) response from the CDN. The response includes a x-ms-error-code: UnsupportedHttpVerb header and also allow: GET,HEAD.

We have setup CORS in our Blob service from the Storage account, allowing for all origins, headers and GET, HEAD and OPTIONS methods:

User's image

If, via curl for example, I try to do OPTIONS on the resource, I am getting the 405. This does however not happen for GET nor HEAD.

So, is OPTIONS supported at all for Azure CDN? Is there anything (else?) we should be configuring?

Thanks in advance!

Azure Storage Accounts
Azure Storage Accounts
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
3,243 questions
Azure Content Delivery Network
{count} votes

1 answer

Sort by: Most helpful
  1. SaiKishor-MSFT 17,236 Reputation points
    2023-03-20T23:23:20.5433333+00:00

    @Miguel Garcia Lopez Thanks for reaching out to Microsoft Q&A.

    Have you set the Access-Control-Allow-Origin header to wildcard (*) or a single origin? Please refer here- https://learn.microsoft.com/en-us/azure/cdn/cdn-cors#wildcard-or-single-origin-scenarios


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.