更新
This commit is contained in:
@ -113,17 +113,17 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
|
||||
.antMatchers("/webjars/**").anonymous()
|
||||
.antMatchers("/login", "/captcha/get", "/captcha/check").permitAll()
|
||||
.antMatchers("/*/api-docs").anonymous()
|
||||
.antMatchers("/druid/**").anonymous();
|
||||
.antMatchers("/druid/**").anonymous()
|
||||
// // 除上面外的所有请求全部需要鉴权认证
|
||||
// .anyRequest().authenticated()
|
||||
// .and()
|
||||
// .headers().frameOptions().disable();
|
||||
// httpSecurity.logout().logoutUrl("/logout").logoutSuccessHandler(logoutSuccessHandler);
|
||||
// // 添加JWT filter
|
||||
// httpSecurity.addFilterBefore(authenticationTokenFilter, UsernamePasswordAuthenticationFilter.class);
|
||||
// // 添加CORS filter
|
||||
// httpSecurity.addFilterBefore(corsFilter, JwtAuthenticationTokenFilter.class);
|
||||
// httpSecurity.addFilterBefore(corsFilter, LogoutFilter.class);
|
||||
.anyRequest().authenticated()
|
||||
.and()
|
||||
.headers().frameOptions().disable();
|
||||
httpSecurity.logout().logoutUrl("/logout").logoutSuccessHandler(logoutSuccessHandler);
|
||||
// 添加JWT filter
|
||||
httpSecurity.addFilterBefore(authenticationTokenFilter, UsernamePasswordAuthenticationFilter.class);
|
||||
// 添加CORS filter
|
||||
httpSecurity.addFilterBefore(corsFilter, JwtAuthenticationTokenFilter.class);
|
||||
httpSecurity.addFilterBefore(corsFilter, LogoutFilter.class);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user