Interface GlobalFilter

All Known Implementing Classes:
AdaptCachedBodyGlobalFilter, ForwardPathFilter, ForwardRoutingFilter, FunctionRoutingFilter, GatewayMetricsFilter, GatewayNoLoadBalancerClientAutoConfiguration.NoLoadBalancerClientFilter, GlobalLocalResponseCacheGatewayFilter, LoadBalancerServiceInstanceCookieFilter, NettyRoutingFilter, NettyWriteResponseFilter, ReactiveLoadBalancerClientFilter, RemoveCachedBodyFilter, RouteToRequestUrlFilter, StreamRoutingFilter, WebsocketRoutingFilter

public interface GlobalFilter
Contract for interception-style, chained processing of gateway requests that may be used to implement cross-cutting, application-agnostic requirements such as security, timeouts, and others. Only applies to matched gateway routes. Copied from framework WebFilter
Since:
5.0
Author:
Rossen Stoyanchev
  • Method Summary

    Modifier and Type
    Method
    Description
    reactor.core.publisher.Mono<Void>
    filter(org.springframework.web.server.ServerWebExchange exchange, GatewayFilterChain chain)
    Process the Web request and (optionally) delegate to the next GatewayFilter through the given GatewayFilterChain.
  • Method Details

    • filter

      reactor.core.publisher.Mono<Void> filter(org.springframework.web.server.ServerWebExchange exchange, GatewayFilterChain chain)
      Process the Web request and (optionally) delegate to the next GatewayFilter through the given GatewayFilterChain.
      Parameters:
      exchange - the current server exchange
      chain - provides a way to delegate to the next filter
      Returns:
      Mono<Void> to indicate when request processing is complete