question

NicolasWEBER-0386 avatar image
2 Votes"
NicolasWEBER-0386 asked GitaraniSharmaMSFT-4262 commented

CDN Source pattern doesn't accept / anymore

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-cdn
image.png (23.8 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello @NicolasWEBER-0386 ,

Apologies for the delay in response.

I have reached out to the Azure CDN Product Group team to find out the cause of this issue. Will keep you updated on their response.

Thanks,
Gita

0 Votes 0 ·

1 Answer

GitaraniSharmaMSFT-4262 avatar image
1 Vote"
GitaraniSharmaMSFT-4262 answered GitaraniSharmaMSFT-4262 commented

Hello @NicolasWEBER-0386 ,

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://docs.microsoft.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.




· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks for your feedback @GitaraniSharmaMSFT-4262 It helped us as it was well explained and it let me discover the Azure Resource explorer btw!
Updating the CDN via this explorer fixed the issue.

Looking forward to get the UI back to work =)

1 Vote 1 ·

@NicolasWEBER-0386 , I'm glad to hear that the issue was fixed and always happy to help. The PG team is working on the Portal UI bug to get it back up as soon as possible.

0 Votes 0 ·