Browse Source

Squashed 'react-ui/' changes from 2a174eba..0a51cf98

0a51cf98 feat: 调整proxy

git-subtree-dir: react-ui
git-subtree-split: 0a51cf98930808c9fed4ec0e1eccd092a66d60a2
pull/286/head^2
zhaowei 10 months ago
parent
commit
8d7623faa9
1 changed files with 22 additions and 2 deletions
  1. +22
    -2
      config/proxy.ts

+ 22
- 2
config/proxy.ts View File

@@ -20,9 +20,9 @@ export default {
// localhost:8000/api/** -> https://preview.pro.ant.design/api/**
'/api/': {
// 要代理的地址
target: 'http://172.20.32.197:31213', // 开发环境
// target: 'http://172.20.32.197:31213', // 开发环境
// target: 'http://172.20.32.235:31213', // 测试环境
// target: 'http://172.20.32.127:8082',
target: 'http://36.103.199.74:31213', // 公网环境
// target: 'http://172.20.32.164:8082',
// 配置了这个可以从 http 代理到 https
// 依赖 origin 的功能可能需要这个,比如 cookie
@@ -33,6 +33,26 @@ export default {
target: 'http://172.20.32.235:31213',
changeOrigin: true,
},
'/proxyApi/skybox-flames/': {
target: 'http://36.103.199.74:30009/',
// target: 'http://172.31.164.103:30009/',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/proxyApi\/skybox-flames/, ''),
},
'/proxyApi/skybox-flames/flames/api/v1': {
target: 'http://36.103.199.74:30009/',
// target: 'http://172.31.164.103:30009/',
changeOrigin: true,
rewrite: (path) =>
path.replace(
/^\/proxyApi\/skybox-flames\/flames\/api\/v1/,
'/flames/api/v1'
),
},
'/proxyApi/': {
target: 'http://36.103.199.74:30009/',
// target: 'http://172.31.164.103:30009/',
},
},

/**


Loading…
Cancel
Save