I have two URL's addresses which I have filter for everyone of them:
all(uri: '/api/first/**')
{
before =
}
all(uri: '/api/second/**')
{
before =
}
I want to write just one filter for both. So I have tried to write a filter with regex:
all(uri: '\\/api\\/(first|second)\\/.*', regex: true)
{
before =
}
But it doesn't work. I have tried many ways ('**' / '.*' / invert: true) But didn't succeed.
Does someone know where the mistake and what the right way to write the filter?
Thanks...
As per the documentation,
uriis an ant path and does not support regular expressions. You need to rely onfind: