Remove CsrfWebFilter.setTokenFromMultipartDataEnabled
Closes gh-12019
This commit is contained in:
parent
819529f5ea
commit
45a963a011
|
@ -113,23 +113,6 @@ public class CsrfWebFilter implements WebFilter {
|
||||||
this.requestHandler = requestHandler;
|
this.requestHandler = requestHandler;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Specifies if the {@code CsrfWebFilter} should try to resolve the actual CSRF token
|
|
||||||
* from the body of multipart data requests.
|
|
||||||
* @param tokenFromMultipartDataEnabled true if should read from multipart form body,
|
|
||||||
* else false. Default is false
|
|
||||||
* @deprecated Use
|
|
||||||
* {@link ServerCsrfTokenRequestAttributeHandler#setTokenFromMultipartDataEnabled(boolean)}
|
|
||||||
* instead
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
public void setTokenFromMultipartDataEnabled(boolean tokenFromMultipartDataEnabled) {
|
|
||||||
if (this.requestHandler instanceof ServerCsrfTokenRequestAttributeHandler) {
|
|
||||||
((ServerCsrfTokenRequestAttributeHandler) this.requestHandler)
|
|
||||||
.setTokenFromMultipartDataEnabled(tokenFromMultipartDataEnabled);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Mono<Void> filter(ServerWebExchange exchange, WebFilterChain chain) {
|
public Mono<Void> filter(ServerWebExchange exchange, WebFilterChain chain) {
|
||||||
if (Boolean.TRUE.equals(exchange.getAttribute(SHOULD_NOT_FILTER))) {
|
if (Boolean.TRUE.equals(exchange.getAttribute(SHOULD_NOT_FILTER))) {
|
||||||
|
|
Loading…
Reference in New Issue