Interface ServerWebExchangeFirewall
- All Known Implementing Classes:
StrictServerWebExchangeFirewall
public interface ServerWebExchangeFirewall
Interface which can be used to reject potentially dangerous requests and/or wrap them
to control their behaviour.
- Since:
- 6.4
-
Field Summary
Modifier and TypeFieldDescriptionstatic final ServerWebExchangeFirewall
An implementation ofStrictServerWebExchangeFirewall
that does nothing. -
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Mono<org.springframework.web.server.ServerWebExchange>
getFirewalledExchange
(org.springframework.web.server.ServerWebExchange exchange) Get aServerWebExchange
that has firewall rules applied to it.
-
Field Details
-
INSECURE_NOOP
An implementation ofStrictServerWebExchangeFirewall
that does nothing. This is considered insecure and not recommended.
-
-
Method Details
-
getFirewalledExchange
reactor.core.publisher.Mono<org.springframework.web.server.ServerWebExchange> getFirewalledExchange(org.springframework.web.server.ServerWebExchange exchange) Get aServerWebExchange
that has firewall rules applied to it.- Parameters:
exchange
- theServerWebExchange
to apply firewall rules to.- Returns:
- the
ServerWebExchange
that has firewall rules applied to it. - Throws:
ServerExchangeRejectedException
- when a rule is broken.
-