Browse Source

[FE] 跨域问题解决

chenxr3 4 years ago
parent
commit
10df35180d

+ 13 - 13
security-protection-platform/.aid/aid.js

@ -56,17 +56,17 @@ module.exports = {
56 56
  //imagePrefix: url => `${subappURL}/asset/image/${url}`, // 作为子应用必须启用
57 57
  //fontPrefix: url => `${subappURL}/asset/font/${url}`, // 作为子应用必须启用
58 58
  outputPrefix: '/'// 构建后index.html中资源路径的前缀
59
    // ,
60
    // proxy: [
61
    //   {
62
    //     url: '/sp',
63
    //     options: {
64
    //       target: 'http://10.19.90.34:8018',
65
    //       changeOrigin: true,
66
    //       pathRewrite: {
67
    //         '^/sp': '/'
68
    //       }
69
    //     }
70
    //   },
71
    // ]
59
  // ,
60
  // proxy: [
61
  //   {
62
  //     url: '/sp',
63
  //     options: {
64
  //       target: 'http://10.19.90.34:8018',
65
  //       changeOrigin: true,
66
  //       pathRewrite: {
67
  //         '^/sp': '/'
68
  //       }
69
  //     }
70
  //   },
71
  // ]
72 72
}

+ 1 - 1
security-protection-platform/src/conf/axios.config.js

@ -39,7 +39,7 @@ const conf = {
39 39
  },
40 40
  root: {
41 41
    default: {
42
      baseURL: 'http://10.19.90.34:8018' 
42
      baseURL: 'http://10.19.90.34:8018'
43 43
        // baseURL: 'http://localhost:8018'
44 44
        // baseURL: '/sp'
45 45
    },