@Charlie Hu , to secure Azure CDN by blacklisting IP's or for serving content based on header request, you need to deploy Azure Front Door premium SKU. It combines capabilities of Azure Front Door, Azure Content Delivery Network (CDN) standard, and Azure Web Application Firewall (WAF) into a single secure cloud CDN platform with intelligent threat protection.
Refer to this doc for further insights into AFD premium.
----------
Please do not forget to "Accept the answer" wherever the information provided helps you to help others in the community.