首页 > 其他分享> > Response to preflight request doesn't pass access control check: Redirect is not allowed for a
Response to preflight request doesn't pass access control check: Redirect is not allowed for a
作者:互联网
- vue中关于非简单请求跨域问题,跨域配置可如下:
js devServer: { open: false, host: '127.0.0.1', port: 8080, proxy: { '/commonUrl': { target: `https://commonUrl`, //这里是重点,原本是http请求,后端写的是https,所以这里改为https ws: true, changeOrigin: true, https: true, secure: true, // 接受运行在https上,默认不接受 } } },
标签:control,跨域,commonUrl,request,preflight,https,true 来源: https://www.cnblogs.com/sinceForever/p/16481398.html