Hello @Miguel Rojas , Welcome to the Microsoft Q&A forum.
This functionality is currently not supported by Microsoft Azure CDN, please feel free to upvote this feature request regarding the same. https://feedback.azure.com/d365community/idea/624cec62-e025-ec11-b6e6-000d3a4f06a4
You can achieve this functionality using the rules engine of Azure CDN Premium from Verizon and/or Azure Front Door.
Hope this helps! Please let me know if you have any additional questions. Thank you!