Asked by:

CORS Support - Billing

Question

I would like to enable CORS support on our Azure Storage, but have a query about billing.

In the docs, you write that:

only "(s)uccessful preflight requests are billed"

It is my (limited) understanding that standard GET requests - so called 'simple requests' - do not send a preflight request. We only want to make GET requests - we host a bundled JavaScript file that I want to request from another domain using the Fetch
API.

If that's all we are doing, will we get charged for adding CORS support?

Many thanks in advance

DC

Edited by___dc___Wednesday, February 15, 2017 11:30 AMRead some more info on MDN.

If CORS is enabled for the service and there is a CORS rule that matches the preflight request, the service responds to the preflight request with status code 200 (OK). The response includes the required Access-Control headers. In this case, the
request will be billed.

If CORS is not enabled or no CORS rule matches the preflight request, the service responds with status code 403 (Forbidden). In this case, the request will not be billed.

If the OPTIONS request is malformed, the service responds with status code 400 (Bad Request) and the request is not billed. An example of a malformed request is one that doesn’t contain the required Origin and Access-Control-Request-Method headers.

Every REST call to Azure Storage service is counted as one transaction. A typical
Preflight request counts as one REST call. Refer this
page for transaction costs.