Azure CDN - allow only specific folders

jonmauro 21 Reputation points
2021-09-22T06:43:18.757+00:00

Hi

We have setup a CDN connection point correctly: static.domain.com has its origin www.domain.com
I was wondering if it is possible to block access to all users BUT give access only to specific folders.

For example

static.domain.com/page1 is blocked
static.comain.com/css/site.css is allowed

We have tried this using the geofilter option but did not work:
Blocking / to all countries
Allowing /css/ to all countries

Is there any other option to do this

Thank you in advance

Azure Content Delivery Network
{count} votes

Accepted answer
  1. GitaraniSharma-MSFT 47,011 Reputation points Microsoft Employee
    2021-09-24T18:02:39.037+00:00

    Hello @jonmauro ,

    Thank you providing all the requested details.

    Rules are generally executed sequentially so if you have “/” first, it will block everything and not evaluate the other rules. In general defaults (highest scope) should be put last. But looks like you already tried changing the rule sequence and it didn't work.

    I checked with our backend team and Verizon support team and they found out that this is a code bug which is not honoring the rule sequence and hence blocking all files. The engineering team will be working to fix the code at the earliest.

    In the meantime, if this is a time-sensitive project for you, we can help adjust the order of the rule from the backend so that you see the right behavior. So, please send an email to us as advised in the private message.

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

    ----------------------------------------------------------------------------------------------------------------

    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.


0 additional answers

Sort by: Most helpful