打包成jar丢在服务器(端口8090)用jar运行的,x-springboot-ui 拷贝到服务器
nginx 按照demo配置的(监听8089端口),x-springboot-ui中common.js baseURL 直接写的服务器的ip加端口
跑起来提示跨域
Access to XMLHttpRequest at 'http://服务器IP:8090/token/login' from origin 'http://服务器IP:8089' 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.
请教一下大佬应该怎么配置呢?谢谢
打包成jar丢在服务器(端口8090)用jar运行的,x-springboot-ui 拷贝到服务器 nginx 按照demo配置的(监听8089端口),x-springboot-ui中common.js baseURL 直接写的服务器的ip加端口 跑起来提示跨域 Access to XMLHttpRequest at 'http://服务器IP:8090/token/login' from origin 'http://服务器IP:8089' 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. 请教一下大佬应该怎么配置呢?谢谢