-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add "ignore path" option, to exclude path from routing #1266
Comments
Are there any updates on this? Is it possible to add such feature? |
This was explained in #496 (comment) |
Any update on this? |
The use case OP presented is not addressed by that comment. The presented solution of One way I found to handle this case required using the fluent API since negate doesn't seem to be supported in java config unfortunately. It means removing it from the other routes in
|
how about now? |
Is there any update to this? I guess a simple @Component
public class NotPathRoutePredicateFactory extends PathRoutePredicateFactory {
@Override
public Predicate<ServerWebExchange> apply(final Config config) {
return super.apply(config).negate();
}
} usage - id: frontend
uri: ${com.siemens.cms.gateway.routes.frontend}
predicates:
- Path=/**
- NotPath=/actuator/** not particularly pretty though |
Are there plans to implement the feature? |
There are no immediate plans to implement this. Watch for if it gets added to a project or milestone |
Enhancement
Currently I see no way I can exclude particular path from routing. For instance if I want my gateway to expose some endpoints.
If I have the following route configuration (/** - matches everything):
I want to be able to do something like the following (make some exclusions):
or
I think it would be very convenient to have such option.
The text was updated successfully, but these errors were encountered: