解决SpringSecurity权限拦截造成的CORS跨域问题
关于什么是跨域,可以看一下阮一峰的 跨域资源共享 CORS 详解进入正题一般我们在开发前后端分离项目时,需要进行跨域配置,但是如果我们集成了SpringSecurity做安全校验,只配置跨域是不行的,还需要配置一下SpringSecurity使其支持CORS。@Overrideprotected void configure(HttpSecurity http) throws Exception { http // by default uses a Bean by the
原创
2020-12-07 18:39:48 ·
6963 阅读 ·
2 评论