Remove CsrfWebFilter.setTokenFromMultipartDataEnabled

Closes gh-12019
This commit is contained in:
Steve Riesenberg 2022-10-13 10:56:30 -05:00
parent 819529f5ea
commit 45a963a011
No known key found for this signature in database
GPG Key ID: 5F311AB48A55D521
1 changed files with 0 additions and 17 deletions

View File

@ -113,23 +113,6 @@ public class CsrfWebFilter implements WebFilter {
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
public Mono<Void> filter(ServerWebExchange exchange, WebFilterChain chain) {
if (Boolean.TRUE.equals(exchange.getAttribute(SHOULD_NOT_FILTER))) {