Skip to content

Commit

Permalink
Merge pull request apolloconfig#793 from zhouliang815/master
Browse files Browse the repository at this point in the history
fix portal spring security config init bug
  • Loading branch information
nobodyiam authored Oct 24, 2017
2 parents fbc4178 + ea77e45 commit ce521b2
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,8 @@ static class SpringSecurityConfigurer extends WebSecurityConfigurerAdapter {
protected void configure(HttpSecurity http) throws Exception {
http.csrf().disable();
http.headers().frameOptions().sameOrigin();
http.authorizeRequests()
.antMatchers("/openapi/*").permitAll()
.antMatchers("/*").hasAnyRole(USER_ROLE);
http.authorizeRequests().antMatchers("/openapi/**", "/vendor/**", "/styles/**", "/scripts/**", "/views/**", "/img/**").permitAll()
.antMatchers("/**").hasAnyRole(USER_ROLE);
http.formLogin().loginPage("/signin").permitAll().failureUrl("/signin?#/error").and().httpBasic();
http.logout().invalidateHttpSession(true).clearAuthentication(true).logoutSuccessUrl("/signin?#/logout");
http.exceptionHandling().authenticationEntryPoint(new LoginUrlAuthenticationEntryPoint("/signin"));
Expand Down

0 comments on commit ce521b2

Please sign in to comment.