Closed KevinMitchell closed 4 years ago
Hi, you need to limit the requests handled by Charon. To do so, you need to set a request path regex that tells Charon which request should be handled. For example, if you configure Charon like below:
@Bean
CharonConfigurer charonConfigurer() {
return charonConfiguration()
.add(requestMapping("requests handled by Charon").pathRegex("/some/path.*"));
}
then only requests with path that matches /some/path.*
regex pattern will be handled by Charon.
Other requests will be handled locally, for example by a Spring @Controller
if any is present.
See here for more information.
Also, if you want to handle some requests by a filter, you can change the order of Charon's filter:
@Bean
CharonConfigurer charonConfigurer() {
return charonConfiguration()
.filterOrder(Ordered.LOWEST_PRECEDENCE);
}
See here for more information.
If you still need help, let me know.
Hi,
I'm using Charon with a custom interceptor and it's all working as expected.
I now want to define some explicit endpoints in my application. Calls to these endpoints should be routed to these endpoints, but everything else should be forwarded as before. So the "all requests mapping" should only be used if nothing else handles it. I've tried various changes to the configuration without success. So could someone suggest the best way of configuring Charon to handle such a case.
Thanks