Eggjs解决跨域问题
1:先安装egg-cors插件npm install egg-cors -g 或者yarn add egg-cors2:在config/plugin.ts开启egg-cors插件const plugin: EggPlugin = { // 其他的 cors: { enable: true, package: 'egg-cors' } // 其他的};3:在config/config.default.ts中进行配置export def..
原创
2022-03-26 13:49:47 ·
1344 阅读 ·
2 评论