Add /error to ignored paths for security autoconfig

Protecting /error doesn't make a great deal of sense and if it is
protected you don't get the ErrorPageFilter for the attempt at loading
it, so Tomcat renders its own HTML error page (when deployed as WAR).

Fixes gh-1548
This commit is contained in:
Dave Syer
2014-09-13 10:55:39 -05:00
parent bf0c8fc8bb
commit 437fb75424
4 changed files with 39 additions and 5 deletions

View File

@@ -74,7 +74,7 @@ public class ManagementSecurityAutoConfigurationTests {
this.context.refresh();
assertNotNull(this.context.getBean(AuthenticationManagerBuilder.class));
// 6 for static resources, one for management endpoints and one for the rest
assertEquals(8, this.context.getBean(FilterChainProxy.class).getFilterChains()
assertEquals(9, this.context.getBean(FilterChainProxy.class).getFilterChains()
.size());
}
@@ -144,7 +144,7 @@ public class ManagementSecurityAutoConfigurationTests {
this.context.refresh();
// Just the management endpoints (one filter) and ignores now plus the backup
// filter on app endpoints
assertEquals(8, this.context.getBean(FilterChainProxy.class).getFilterChains()
assertEquals(9, this.context.getBean(FilterChainProxy.class).getFilterChains()
.size());
}