ignore web security for static assets

This commit is contained in:
Gauthier Roebroeck 2019-11-21 15:32:51 +08:00
parent 3df5e065f7
commit aa969fd8bd

View file

@ -36,9 +36,6 @@ class SecurityConfiguration(
.csrf().disable()
.authorizeRequests()
// unrestricted endpoints
.requestMatchers(PathRequest.toStaticResources().atCommonLocations()).permitAll()
// restrict all actuator endpoints to ADMIN only
.requestMatchers(EndpointRequest.toAnyEndpoint()).hasRole("ADMIN")
@ -70,6 +67,10 @@ class SecurityConfiguration(
web.ignoring()
.antMatchers(
"/error**",
"/css/**",
"/img/**",
"/js/**",
"/favicon.ico",
"/",
"/index.html")
}