Align default security filter dispatcher types with Spring Security

Fixes gh-33090
This commit is contained in:
Madhura Bhave
2022-11-09 15:26:31 -08:00
parent d34ccb3880
commit f4cf722c27
6 changed files with 24 additions and 6 deletions

View File

@@ -83,8 +83,8 @@ public class SecurityProperties {
/**
* Security filter chain dispatcher types.
*/
private Set<DispatcherType> dispatcherTypes = new HashSet<>(
Arrays.asList(DispatcherType.ASYNC, DispatcherType.ERROR, DispatcherType.REQUEST));
private Set<DispatcherType> dispatcherTypes = new HashSet<>(Arrays.asList(DispatcherType.ASYNC,
DispatcherType.ERROR, DispatcherType.REQUEST, DispatcherType.FORWARD, DispatcherType.INCLUDE));
public int getOrder() {
return this.order;

View File

@@ -161,7 +161,8 @@ class SecurityAutoConfigurationTests {
DelegatingFilterProxyRegistrationBean.class);
assertThat(bean)
.extracting("dispatcherTypes", InstanceOfAssertFactories.iterable(DispatcherType.class))
.containsOnly(DispatcherType.ASYNC, DispatcherType.ERROR, DispatcherType.REQUEST);
.containsOnly(DispatcherType.ASYNC, DispatcherType.ERROR, DispatcherType.REQUEST,
DispatcherType.INCLUDE, DispatcherType.FORWARD);
});
}