Skip to content

Commit 8218785

Browse files
committed
Align default security filter dispatcher types with Spring Security
Fixes spring-projectsgh-33090
1 parent a53141f commit 8218785

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/SecurityProperties.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ public static class Filter {
8383
/**
8484
* Security filter chain dispatcher types.
8585
*/
86-
private Set<DispatcherType> dispatcherTypes = new HashSet<>(
87-
Arrays.asList(DispatcherType.ASYNC, DispatcherType.ERROR, DispatcherType.REQUEST));
86+
private Set<DispatcherType> dispatcherTypes = new HashSet<>(Arrays.asList(DispatcherType.ASYNC,
87+
DispatcherType.ERROR, DispatcherType.REQUEST, DispatcherType.FORWARD, DispatcherType.INCLUDE));
8888

8989
public int getOrder() {
9090
return this.order;

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/servlet/SecurityAutoConfigurationTests.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,8 @@ void defaultFilterDispatcherTypes() {
161161
DelegatingFilterProxyRegistrationBean.class);
162162
assertThat(bean)
163163
.extracting("dispatcherTypes", InstanceOfAssertFactories.iterable(DispatcherType.class))
164-
.containsOnly(DispatcherType.ASYNC, DispatcherType.ERROR, DispatcherType.REQUEST);
164+
.containsOnly(DispatcherType.ASYNC, DispatcherType.ERROR, DispatcherType.REQUEST,
165+
DispatcherType.INCLUDE, DispatcherType.FORWARD);
165166
});
166167
}
167168

0 commit comments

Comments
 (0)