This version is still in development and is not considered stable yet. For the latest stable version, please use Spring Cloud Gateway 4.1.6!

Glossary

  • Route: The basic building block of the gateway. It is defined by an ID, a destination URI, a collection of predicates, and a collection of filters. A route is matched if the aggregate predicate is true.

  • Predicate: This is a Spring WebMvc.fn RequestPredicate. The input type is a Spring WebMvc.fn ServerRequest. This lets you match on anything from the HTTP request, such as headers or parameters.

  • Filter: These are instances of HandlerFilterFunction. Here, you can modify requests and responses before or after sending the downstream request. Filters may also implement Function<ServerRequest, ServerRequest> and adapted to a HandlerFilterFunction by HandlerFilterFunction.ofRequestProcessor() for 'before' filters. For 'after' filters, BiFunction<ServerRequest,T extends ServerResponse,R extends ServerResponse> may be implemented and adapted by HandlerFilterFunction.ofResponseProcessor().