Add /webjars/** to default list of unsecured resources
Fixes gh-2460
This commit is contained in:
parent
9e8beb7323
commit
a3b29b0e42
|
|
@ -88,7 +88,7 @@ import org.springframework.util.StringUtils;
|
|||
public class SpringBootWebSecurityConfiguration {
|
||||
|
||||
private static List<String> DEFAULT_IGNORED = Arrays.asList("/css/**", "/js/**",
|
||||
"/images/**", "/**/favicon.ico");
|
||||
"/images/**", "/webjars/**", "/**/favicon.ico");
|
||||
|
||||
@Bean
|
||||
@ConditionalOnMissingBean({ IgnoredPathsWebSecurityConfigurerAdapter.class })
|
||||
|
|
|
|||
|
|
@ -90,9 +90,9 @@ public class SecurityAutoConfigurationTests {
|
|||
PropertyPlaceholderAutoConfiguration.class);
|
||||
this.context.refresh();
|
||||
assertThat(this.context.getBean(AuthenticationManagerBuilder.class)).isNotNull();
|
||||
// 4 for static resources and one for the rest
|
||||
// 5 for static resources and one for the rest
|
||||
assertThat(this.context.getBean(FilterChainProxy.class).getFilterChains())
|
||||
.hasSize(5);
|
||||
.hasSize(6);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
|||
|
|
@ -2181,7 +2181,7 @@ The basic features you get out of the box in a web application are:
|
|||
* An `AuthenticationManager` bean with in-memory store and a single user (see
|
||||
`SecurityProperties.User` for the properties of the user).
|
||||
* Ignored (insecure) paths for common static resource locations (`+/css/**+`, `+/js/**+`,
|
||||
`+/images/**+` and `+**/favicon.ico+`).
|
||||
`+/images/**+`, `+/webjars/**+` and `+**/favicon.ico+`).
|
||||
* HTTP Basic security for all other endpoints.
|
||||
* Security events published to Spring's `ApplicationEventPublisher` (successful and
|
||||
unsuccessful authentication and access denied).
|
||||
|
|
|
|||
Loading…
Reference in New Issue