Search code examples
azureazure-storageazure-blob-storage

Public blob url not accessible when Authorization header is sent


I have an Azure Storage account, with Allow Blob public access enabled and a container with public access level set to Blob. I have uploaded a dummy image to the container and I am able to access it in any browser. If I set a dummy authorization request header to the blob url, then the image can not be accessed anymore. Is there a way to ignore the authorization header if public access is enabled?

enter image description here


Solution

  • As for the Storage Account there isn't any such option. You could however try one of the following:

    Setup an Azure CDN for your Storage Account and add a rule engine for the CDN endpoint to remove the Authorization header of the request.

    Create an endpoint (e.g. Function App) that merely redirects to the specified blob. In the usual case the client will follow the redirect but strip the authorization header from request.