Class RequestHeaderSizeGatewayFilterFactory
- java.lang.Object
-
- org.springframework.cloud.gateway.support.AbstractConfigurable<C>
-
- org.springframework.cloud.gateway.filter.factory.AbstractGatewayFilterFactory<RequestHeaderSizeGatewayFilterFactory.Config>
-
- org.springframework.cloud.gateway.filter.factory.RequestHeaderSizeGatewayFilterFactory
-
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,GatewayFilterFactory<RequestHeaderSizeGatewayFilterFactory.Config>,Configurable<RequestHeaderSizeGatewayFilterFactory.Config>,ShortcutConfigurable,org.springframework.context.ApplicationEventPublisherAware
public class RequestHeaderSizeGatewayFilterFactory extends AbstractGatewayFilterFactory<RequestHeaderSizeGatewayFilterFactory.Config>
This filter validates the size of each Request Header in the request, including the key. If size of the request header is greater than the configured maxSize, it blocks the request. Default max size of request header is 16KB.- Author:
- Sakalya Deshpande, Marta Medio
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRequestHeaderSizeGatewayFilterFactory.Config-
Nested classes/interfaces inherited from class org.springframework.cloud.gateway.filter.factory.AbstractGatewayFilterFactory
AbstractGatewayFilterFactory.NameConfig
-
Nested classes/interfaces inherited from interface org.springframework.cloud.gateway.support.ShortcutConfigurable
ShortcutConfigurable.GatewayEvaluationContext, ShortcutConfigurable.RestrictivePropertyAccessor, ShortcutConfigurable.ShortcutType
-
-
Field Summary
-
Fields inherited from interface org.springframework.cloud.gateway.filter.factory.GatewayFilterFactory
NAME_KEY, VALUE_KEY
-
-
Constructor Summary
Constructors Constructor Description RequestHeaderSizeGatewayFilterFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GatewayFilterapply(RequestHeaderSizeGatewayFilterFactory.Config config)List<String>shortcutFieldOrder()Returns hints about the number of args and the order for shortcut parsing.-
Methods inherited from class org.springframework.cloud.gateway.filter.factory.AbstractGatewayFilterFactory
getPublisher, setApplicationEventPublisher
-
Methods inherited from class org.springframework.cloud.gateway.support.AbstractConfigurable
getConfigClass, newConfig, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.springframework.cloud.gateway.filter.factory.GatewayFilterFactory
apply, apply, apply, getConfigClass, name, newConfig
-
Methods inherited from interface org.springframework.cloud.gateway.support.ShortcutConfigurable
shortcutFieldPrefix, shortcutType
-
-
-
-
Method Detail
-
shortcutFieldOrder
public List<String> shortcutFieldOrder()
Description copied from interface:ShortcutConfigurableReturns hints about the number of args and the order for shortcut parsing.- Returns:
- the list of hints
-
apply
public GatewayFilter apply(RequestHeaderSizeGatewayFilterFactory.Config config)
-
-