|
|
@@ -44,10 +44,6 @@ public class SpringSecurityConfiguration extends WebSecurityConfigurerAdapter {
|
|
|
.sessionManagement()
|
|
|
.sessionCreationPolicy(SessionCreationPolicy.STATELESS)
|
|
|
.and()
|
|
|
- .authorizeRequests()
|
|
|
- //跨域的Options请求进行放行
|
|
|
- .requestMatchers(CorsUtils::isPreFlightRequest).permitAll()
|
|
|
- .and()
|
|
|
// auth
|
|
|
.authorizeRequests()
|
|
|
.antMatchers(
|
|
|
@@ -61,6 +57,7 @@ public class SpringSecurityConfiguration extends WebSecurityConfigurerAdapter {
|
|
|
"/api/receiveIDToken",
|
|
|
"/api/authenticate")
|
|
|
.permitAll() // authenticate
|
|
|
+ .requestMatchers(CorsUtils::isPreFlightRequest).permitAll()
|
|
|
.antMatchers("/api/**")
|
|
|
.authenticated()
|
|
|
.and()
|