iview-admin icon indicating copy to clipboard operation
iview-admin copied to clipboard

项目打包部署跨域

Open xuanfengkou opened this issue 5 years ago • 2 comments

axios.defaults.withCredentials = true 前端已经加了这个了,后台也做处理了,还是跨域,发起的是options请求

xuanfengkou avatar Apr 29 '19 13:04 xuanfengkou

在axios 的 headers中,Content-Type设置为 'application/x-www-form-urlencoded' 试试

jieme avatar May 16 '19 15:05 jieme

axios.defaults.withCredentials = true 设置的带cookie过去。java如果设置跨域是用 *设置的。会导致跨域失效的。

JackCapillary avatar Aug 21 '19 02:08 JackCapillary