-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for regexes in @Filter for HttpServerFilter #5842
Comments
@racevedoo Proposal looks good! PR welcome |
racevedoo
added a commit
to racevedoo/micronaut-core
that referenced
this issue
Aug 9, 2021
Adds a attribute to the `Filter` annotation, specifying which style of pattern to use, keeping Ant as the default (avoiding breaking changes). Fixes micronaut-projects#5842
racevedoo
added a commit
to racevedoo/micronaut-core
that referenced
this issue
Aug 9, 2021
Adds a attribute to the `Filter` annotation, specifying which style of pattern to use, keeping Ant as the default (avoiding breaking changes). Fixes micronaut-projects#5842
racevedoo
added a commit
to racevedoo/micronaut-core
that referenced
this issue
Aug 9, 2021
Adds a attribute to the `Filter` annotation, specifying which style of pattern to use, keeping Ant as the default (avoiding breaking changes). Fixes micronaut-projects#5842
racevedoo
added a commit
to racevedoo/micronaut-core
that referenced
this issue
Aug 10, 2021
Adds a attribute to the `Filter` annotation, specifying which style of pattern to use, keeping Ant as the default (avoiding breaking changes). Fixes micronaut-projects#5842
racevedoo
added a commit
to racevedoo/micronaut-core
that referenced
this issue
Aug 19, 2021
Adds a attribute to the `Filter` annotation, specifying which style of pattern to use, keeping Ant as the default (avoiding breaking changes). Fixes micronaut-projects#5842
racevedoo
added a commit
to racevedoo/micronaut-core
that referenced
this issue
Aug 19, 2021
Adds a attribute to the `Filter` annotation, specifying which style of pattern to use, keeping Ant as the default (avoiding breaking changes). Also adds proper documentation. Fixes micronaut-projects#5842
jameskleeh
pushed a commit
that referenced
this issue
Aug 23, 2021
Merged into 3.1.x |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi all!
When using
@Filter
annotations withHttpServerFilter
, currently thepattern
attribute only supports Ant-style patterns. Because of it, we can't use more complicated patterns (using regex, for example). A simple case that regex can support but Ant can't is accepting all paths except one.This question was raised on gitter (discussed briefly with @jameskleeh), and I suggested that we support something like
@Filter(pattern="/mypath", patternStyle=ANT)
or@Filter(pattern="/mypath", patternStyle=REGEX)
, with the default being Ant, to avoid breaking changes.One thing to note is that using regexes is less performant than using Ant-style patterns. This should be communicated properly to users.
If this is fine, I can come up with a PR.
Expected Behaviour
Micronaut should support more complex patterns for
@Filter
Actual Behaviour
Micronaut only supports simple Ant-style patterns for
@Filter
The text was updated successfully, but these errors were encountered: