1

I have created a blob container and made it a static website hosting, where inside the $web folder I have put all the build files of my react application. Please refer to the below image

enter image description here

And I have enabled the CDN for the storage account. Add the below rules

enter image description here

Azure CDN URL - https://ghcrablobcdn.azureedge.net

Static Website URL - https://ghcrablobcdn.z13.web.core.windows.net/

Now I want to make that only Azure CDN can access the static website URL, Direct access to the Static Website URL has to be prohibited or it shows 404, like that.

How can I add this restriction?

Do I have to add any network restrictions or like that?

your help or solution would be appreciated

SDK
  • 1,356
  • 3
  • 19
  • 44

1 Answers1

1

Thanks @gunnarpeipman for the clear steps.

Do I have to add any network restrictions or like that?

Yes, we need to configure few options in Storage Account =>Networking Section.

Select the Public network option as shown below and Add new virtual network

enter image description here

enter image description here

OR

As mentioned in the MSDoc, we can configure our storage account with SAS - Shared access signature to restrict the access.

enter image description here

Now configure the CDN to use the generated SAS token.

Navigate to the CDN => Endpoint => Origin

enter image description here

Harshitha
  • 3,784
  • 2
  • 4
  • 9