Azure CDN rules engine broke my app

Michael Brandt 31 Reputation points
2021-05-29T12:42:59.467+00:00

I have this rule on a CDN for a static website (SPA).

100650-sk%C3%A6rmbillede-2021-05-29-kl-143404.png

The cache part is not working very well so I tried to adjust it. The UI then forced me to change the source path in the rewrite action like this:
100731-sk%C3%A6rmbillede-2021-05-29-kl-143716.png

I figured I had to replace "/" with "/." as the UI forced me to, and did so.

This meant that the redirect no longer worked and with this my entire SPA was taken down.

The panic first stared because the UI prevented me from changing it back, because the UI meant "/" was an invalid value.

I came around this by capturing the network request the UI send, copied the bearer token and request body to postman (and changed the "/." to "/") and posted it to the server which made me have the old value again.

But this is really a major error, because it has so severe effect and there is no real way back.

Azure Content Delivery Network
{count} votes

Accepted answer
  1. GitaraniSharma-MSFT 49,386 Reputation points Microsoft Employee
    2021-06-01T16:38:39.417+00:00

    Hello @Michael Brandt ,

    I did some research and found similar issues with other customers which have already been reported to our product team. Preliminary investigation points out that this is a validation error only seen on the Azure Portal UI and is not a CDN bug.

    To fix this issue at the earliest, we suggest that you use REST API to update the rule:
    https://video2.skills-academy.com/en-us/rest/api/cdn/cdn/endpoints/update#urlrewriteactionparameters

    OR use Azure Resource explorer to edit the sourcePattern as below:

    "actions": [  
                {  
                  "name": "UrlRewrite",  
                  "parameters": {  
                    "sourcePattern": "/",  
                    "destination": "/index.html",  
                    "preserveUnmatchedPath": false,  
    			  
    

    The Product team will be fixing the Azure portal UI bug soon.

    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 comments No comments

0 additional answers

Sort by: Most helpful