vue.config.js 278 B

1234567891011121314
  1. module.exports = {
  2. devServer: {
  3. proxy: { //配置跨域
  4. '/apis': {
  5. target: 'http://pv.sohu.com', //搜狐的域名
  6. ws: false,
  7. changOrigin: true, //允许跨域
  8. pathRewrite: {
  9. '^/apis': '' //请求的时候使用这个api就可以
  10. }
  11. }
  12. }
  13. },
  14. }