spring-cloud-gateway icon indicating copy to clipboard operation
spring-cloud-gateway copied to clipboard

Spring Cloud Gateway MVC: using custom filter in the YAML

Open NiiazKhan opened this issue 1 year ago • 0 comments

For Spring Cloud Gateway MVC (without webFlux), an equivalent of AbstractGatewayFilterFactory (Gateway Reactive Server) is needed, which allows writing a custom filter and using it by specifying it in the YAML manifest, as shown in this StackOverflow question.

Currently, to use a custom filter, I am forced to write a @Bean RouterFunction in Java.

Refer to the filter in Gateway Reactive Server here: Spring Cloud Gateway - Writing Custom GatewayFilter Factories.

NiiazKhan avatar Feb 16 '24 12:02 NiiazKhan