proxy: { '/api': { target: "http://192.168.10.253:8082", //跨域地址 changeOrigin: true, //支持跨域 rewrite: (path) => path.replace(/^\/api/, "")//重写路径,替换/api } }
cookie-seession形式中请求头Host、Origin、Referer(三项必须一致)
请求头
token形式中请求头Host(不一致)、Origin与Referer(一致)
标签:Origin,vue,跨域,代理,Host,api,Referer,设置,path From: https://www.cnblogs.com/zhanghuilong/p/18140058