It should be possible to bypass CDN caching, when app (e.g. ASP NET MVC or .NET Core application) returns redirectresult with http status 301. Otherwise runs the application in an endless redirection loop.
Actually does the Microsoft CDN cache pages with 301 http status. But if the 301 page content is empty and the server is triggering with that call a redirecting, then you have a endless redirect.
Code example see attachment.
1. User is calling is typing in domain.tld/path?qs=1
2. CDN is configured to redirect (301) http to https and also non-www to www.domain.tld
3. The server doesn't support query strings and will redirect the request to the same url without query. https://www.domain.tld/path?qs=1 to https://www.domain.tld/path
4. Now we have a endless loop with Microsoft CDN, not with Akamai and Verizon Premium.