Describe the bug
az cdn endpoint purge ... --content-paths "/" "/*" does not purge files in root directory.
To Reproduce
"/" and "/*", the only thing that worked was --contentpath "/testfile.txt")Expected behavior
Purging / or /* should purge all files.
Environment summary
azure-cli (2.0.39)
cdn (0.0.14)
I've figured out what was causing the issue. I had a URL Rewrite Rule on my CDN that must have been interfering with the purge requests.
Adding the following conditional check to the URL Rewrite Rule fixed everything:
IF -> Request Header Regex -> User-Agent -> Does Not Match -> ECPurge/*
Ignore Case = true
                    
Most helpful comment
I've figured out what was causing the issue. I had a URL Rewrite Rule on my CDN that must have been interfering with the purge requests.
Adding the following conditional check to the URL Rewrite Rule fixed everything: