Created
July 20, 2017 18:51
-
-
Save ruddell/585811967589120130e8c7fd6e78b841 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.mycompany.myapp.config; | |
import org.springframework.context.annotation.Configuration; | |
import org.springframework.http.HttpMethod; | |
import org.springframework.security.config.annotation.web.builders.WebSecurity; | |
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; | |
@Configuration | |
public class WebSecurityConfiguration extends WebSecurityConfigurerAdapter { | |
@Override | |
public void configure(WebSecurity web) throws Exception { | |
web.ignoring() | |
.antMatchers(HttpMethod.OPTIONS, "/**") | |
.antMatchers("/app/**/*.{js,html}") | |
.antMatchers("/bower_components/**") | |
.antMatchers("/i18n/**") | |
.antMatchers("/content/**") | |
.antMatchers("/swagger-ui/index.html") | |
.antMatchers("/test/**") | |
.antMatchers("/h2-console/**"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment