CORS Support - Billing


  • Hello

    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


    • Edited by ___dc___ Wednesday, February 15, 2017 11:30 AM Read some more info on MDN.
    Wednesday, February 15, 2017 10:01 AM

All replies

  • Could you confirm if you're referring to the below document?

    A CORS request from an origin domain may consist of two separate requests:

    1. A preflight request, which queries the CORS restrictions imposed by the service. The preflight request is required unless the request method is a simple method, meaning GET, HEAD, or POST.

    2. The actual request, made against the desired resource.

    • Edited by Md Shihab Thursday, February 16, 2017 5:44 AM
    • Proposed as answer by Md Shihab Tuesday, February 28, 2017 9:39 AM
    Thursday, February 16, 2017 5:41 AM
  • I was reading that same paragraph and couldn't understand. If I use CORS in storage will I get billed? And if so, how much is it?
    • Edited by Joao_Oliveira Friday, November 3, 2017 7:29 PM text correction
    Friday, November 3, 2017 7:28 PM
  • 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.


    Do click on "Mark as Answer" on the post that helps you, this can be beneficial to other community members.

    • Proposed as answer by Joao_Oliveira Monday, November 6, 2017 12:29 PM
    Monday, November 6, 2017 10:32 AM