Merge branch '2.2.x'
This commit is contained in:
@@ -2495,7 +2495,7 @@ public class PreGatewayFilterFactory extends AbstractGatewayFilterFactory<PreGat
|
||||
//request before calling chain.filter
|
||||
ServerHttpRequest.Builder builder = exchange.getRequest().mutate();
|
||||
//use builder to manipulate the request
|
||||
return chain.filter(exchange.mutate().request(request).build());
|
||||
return chain.filter(exchange.mutate().request(builder.build()).build());
|
||||
};
|
||||
}
|
||||
|
||||
@@ -2534,6 +2534,19 @@ public class PostGatewayFilterFactory extends AbstractGatewayFilterFactory<PostG
|
||||
----
|
||||
====
|
||||
|
||||
==== Naming Custom Filters And References In Configuration
|
||||
|
||||
Custom filters class names should end in `GatewayFilterFactory`.
|
||||
|
||||
For example, to reference a filter named `Something` in configuration files, the filter
|
||||
must be in a class named `SomethingGatewayFilterFactory`.
|
||||
|
||||
WARNING: It is possible to create a gateway filter named without the
|
||||
`GatewayFilterFactory` suffix, such as `class AnotherThing`. This filter could be
|
||||
referenced as `AnotherThing` in configuration files. This is **not** a supported naming
|
||||
convention and this syntax may be removed in future releases. Please update the filter
|
||||
name to be compliant.
|
||||
|
||||
=== Writing Custom Global Filters
|
||||
|
||||
To write a custom global filter, you must implement `GlobalFilter` interface.
|
||||
|
||||
Reference in New Issue
Block a user