3

I have a Azure CDN from Microsoft setup in front of a web api. I am testing the rules engine, but i can't use the * even though it is mentioned in the docs: https://learn.microsoft.com/en-us/azure/cdn/cdn-standard-rules-engine-match-conditions#url-path. I have this test set up: Rule engine setup

Where I have set the Operator to "Begins With", but I have tried many other operators as well. The Value is "/api/*/test". I have a controller on my webapi, "/api/path/test", that I am trying to get to a cache-control set and it is not when the response comes. If i change the Value of the operator to "/api/path/test", i get the cache-control set as expected.

There do exist an operator called "wildcard", but i cant find any docs on it, and it doesn't work when i pick it.

Is the docs wrong on this, and therefore wildcards isn't supported, or am I doing it wrong?

mslot
  • 4,959
  • 9
  • 44
  • 76

1 Answers1

0

Pick "Wildcards" from the Operator dropdown instead of "Begins with".enter image description here

Laszlo Fogas
  • 156
  • 4
  • As I said, I have tried that, and it didn't work. Have you successfully made it work? Could you post a screenshot of your rule? Could I have you try to do the same as mine in the screenshot? – mslot Jun 04 '20 at 20:17
  • Added a screenshot. It works as it is displayed. It's not caching index.html, index.js, index.css – Laszlo Fogas Jun 08 '20 at 04:55
  • Could I have you try with paths and not filenames. Like /*/path/to/index.*. I suspect that wildcards only work on filename part :) – mslot Jun 08 '20 at 10:49