【发布时间】:2022-01-20 02:55:39
【问题描述】:
使用 Angularjs 或 vue 需要 node .. 并允许像 ReactJS 在 conf 文件中所做的 CORS 请求? 有没有办法在服务器上不允许 CORS 过滤器?
【问题讨论】:
标签: reactjs angularjs vue.js cors
使用 Angularjs 或 vue 需要 node .. 并允许像 ReactJS 在 conf 文件中所做的 CORS 请求? 有没有办法在服务器上不允许 CORS 过滤器?
【问题讨论】:
标签: reactjs angularjs vue.js cors
简而言之,在 vue.config.js 文件中添加以下行:
// vue.config.js
module.exports = {
// options...
devServer: {
proxy: 'https://mywebsite/',
}
}
【讨论】: