In Azure Front door Premium, Is it possible to just add a query string using URL rewrite feature.

Mudragada, Varun Krishna 25 Reputation points
2024-05-15T11:24:40.6766667+00:00

I am basically trying to integrate my blob storage with Azure front door and CDN profile. As the storage doesn't allow public access i would need to utilize the SAS token. I am looking if there is a way to hide the SAS token from end user. I believe URL rewrite should be able to add the SAS token I have tried many different way however none worked. Please advice.

I have tried the approach mentioned here.

https://learn.microsoft.com/en-us/answers/questions/1363114/url-rewrite-for-adding-sas-token-edgio-premium-rul

Azure Front Door
Azure Front Door
An Azure service that provides a cloud content delivery network with threat protection.
692 questions
Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
2,919 questions
{count} vote

Accepted answer
  1. KapilAnanth-MSFT 46,876 Reputation points Microsoft Employee
    2024-05-21T10:35:49.5833333+00:00

    @Mudragada, Varun Krishna ,

    Greetings.

    May I know what exactly was issue with using AFD Rule Engine?

    I did a lab and I was successfully able to achieve this,

    • You have to append the SAS Token to the URL Path
    • The trick is to rewrite the entire URLPath with {url_path} server variable + SAS Token
    • Something like this,
      • User's image

    From AFD Logs,

    • User's image
    • As you can see, the original request from client was <AFDEndPoint>/private/index.html
    • But the request that went to the Storage Account was <StorageAccountName>.blob.core.windows.net:443/private/index.html?<SASToken>
    • The "?<SASToken>" got appended because of the Rule Engine Rule.
    • And I got a successful 200

    For more information,

    Kindly let us know if this helps or you need further assistance on this issue.

    Thanks,

    Kapil


    Please don’t forget to close the thread by clicking "Accept the answer" wherever the information provided helps you, as this can be beneficial to other community members.

    2 people found this answer helpful.

0 additional answers

Sort by: Most helpful

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.