1

Is it possible to use regular expressions in Match-Path-rules to match general broader url-patterns and to be able to match very specific patterns. I dont want to use {**catch-all} but for example an ordinary RegExp like /api/\w{1,3}-\d{1,9} ...

Is this possible to achieve with Yarp in some way?

"Match": {
        "Path": "<Regular expressions here or ?>"
    }
user3154653
  • 203
  • 1
  • 11

1 Answers1

1

You can write something like this:

"Match": {
   "Path": "/api/{path:regex(\\w{{1,3}}-\\d{{1,9}})}"
}

or

"Match": {
   "Path": "/api/{folder1:regex(^\\w{{1,3}}$)}-{folder2:regex(^\\d{{1,9}}$)}"
}
drlivsi
  • 143
  • 4
  • 9