CDN Source pattern doesn't accept / anymore

Nicolas WEBER 36 Reputation points
2021-05-28T14:35:46.44+00:00

We configured our CDN rules engine to serve a SPA application (which means redirecting any request to the index.html page if it's not an asset or a static file).
Our rule was working well but we needed to update some condition on it. Validating it gave us this error100662-image.png

Of course, putting /. in doesn't work as expected but / isn't a valid source anymore. Neither do regex like /.+ or /*
Any feedback would be helpful to get a valid SPA rule back to work.

Thank you

Azure Content Delivery Network
{count} votes

Accepted answer
  1. GitaraniSharma-MSFT 49,591 Reputation points Microsoft Employee
    2021-06-01T16:37:41.157+00:00

    Hello @Nicolas WEBER ,

    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.

    1 person 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.