加SSL的SpringBoot项目用https访问出现CORS跨域问题

问题是这样的,我用SpringBoot在服务器上搭了一个新的微服务,在本地调试遇到跨域问题加个CorsFilter拦截器Bean就解决,但升到服务器上却仍然报跨域问题:“Access to XMLHttpRequest at 'https://xxx.xubingtao.cn/xxx' from origin 'https://www.xubingtao.cn' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.”或“Access to XMLHttpRequest at 'https://xxx.xubingtao.cn/xxx' from origin 'https://www.xubingtao.cn' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.”

详情访问我的个人网站:https://www.xubingtao.cn/2020/11/12/ssl_springboot_https_cors/

猜你喜欢

转载自blog.csdn.net/xubingtao/article/details/109636181