
看起来像是default
SecurityConfiguration,它不会跳过OPTIONS的安全检查。
尝试将以下内容添加
antMatcher到中的
protected void configure(HttpSecurityhttp)方法
SecurityConfiguration.java
.antMatchers(org.springframework.http.HttpMethod.OPTIONS, "/api/**").permitAll()
欢迎分享,转载请注明来源:内存溢出

看起来像是default
SecurityConfiguration,它不会跳过OPTIONS的安全检查。
尝试将以下内容添加
antMatcher到中的
protected void configure(HttpSecurityhttp)方法
SecurityConfiguration.java
.antMatchers(org.springframework.http.HttpMethod.OPTIONS, "/api/**").permitAll()
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)