|
|
@@ -16,50 +16,50 @@ module.exports = defineConfig({
|
|
|
open: true,
|
|
|
// host: 'localhost',
|
|
|
port: 9000,
|
|
|
- hot: true,
|
|
|
+ hot: true
|
|
|
// https: false,
|
|
|
- proxy: {
|
|
|
- '/op/base': {
|
|
|
- // target: 'http://192.168.3.162:7654',
|
|
|
- target: 'https://company.citupro.com:18182/op/base',
|
|
|
- secure: false, // 是否支持 https,默认 false
|
|
|
- changeOrigin: true, // 是否支持跨域
|
|
|
- headers: {
|
|
|
- // 确保包含这些头部以兼容IE11
|
|
|
- Accept: 'application/json',
|
|
|
- 'Content-Type': 'application/json; charset=utf-8'
|
|
|
- },
|
|
|
- onProxyReq (proxyReq) {
|
|
|
- // 对于IE11的特殊处理
|
|
|
- if (proxyReq.getHeader('origin')) {
|
|
|
- proxyReq.setHeader('origin', 'https://company.citupro.com:18182/op/base')
|
|
|
- }
|
|
|
- },
|
|
|
- pathRewrite: {
|
|
|
- '^/op/base': ''
|
|
|
- }
|
|
|
- },
|
|
|
- '/op/base/api': {
|
|
|
- // target: 'http://192.168.3.162:7654',
|
|
|
- target: 'https://company.citupro.com:18183',
|
|
|
- secure: false, // 是否支持 https,默认 false
|
|
|
- changeOrigin: true, // 是否支持跨域
|
|
|
- headers: {
|
|
|
- // 确保包含这些头部以兼容IE11
|
|
|
- Accept: 'application/json',
|
|
|
- 'Content-Type': 'application/json; charset=utf-8'
|
|
|
- },
|
|
|
- onProxyReq (proxyReq) {
|
|
|
- // 对于IE11的特殊处理
|
|
|
- if (proxyReq.getHeader('origin')) {
|
|
|
- proxyReq.setHeader('origin', 'https://company.citupro.com:18183')
|
|
|
- }
|
|
|
- },
|
|
|
- pathRewrite: {
|
|
|
- '^/op/base/api': '/op/base/api'
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ // proxy: {
|
|
|
+ // '/op/base': {
|
|
|
+ // // target: 'http://192.168.3.162:7654',
|
|
|
+ // target: 'https://company.citupro.com:18182/op/base',
|
|
|
+ // secure: false, // 是否支持 https,默认 false
|
|
|
+ // changeOrigin: true, // 是否支持跨域
|
|
|
+ // headers: {
|
|
|
+ // // 确保包含这些头部以兼容IE11
|
|
|
+ // Accept: 'application/json',
|
|
|
+ // 'Content-Type': 'application/json; charset=utf-8'
|
|
|
+ // },
|
|
|
+ // onProxyReq (proxyReq) {
|
|
|
+ // // 对于IE11的特殊处理
|
|
|
+ // if (proxyReq.getHeader('origin')) {
|
|
|
+ // proxyReq.setHeader('origin', 'https://company.citupro.com:18182/op/base')
|
|
|
+ // }
|
|
|
+ // },
|
|
|
+ // pathRewrite: {
|
|
|
+ // '^/op/base': ''
|
|
|
+ // }
|
|
|
+ // },
|
|
|
+ // '/op/base/api': {
|
|
|
+ // // target: 'http://192.168.3.162:7654',
|
|
|
+ // target: 'https://company.citupro.com:18183',
|
|
|
+ // secure: false, // 是否支持 https,默认 false
|
|
|
+ // changeOrigin: true, // 是否支持跨域
|
|
|
+ // headers: {
|
|
|
+ // // 确保包含这些头部以兼容IE11
|
|
|
+ // Accept: 'application/json',
|
|
|
+ // 'Content-Type': 'application/json; charset=utf-8'
|
|
|
+ // },
|
|
|
+ // onProxyReq (proxyReq) {
|
|
|
+ // // 对于IE11的特殊处理
|
|
|
+ // if (proxyReq.getHeader('origin')) {
|
|
|
+ // proxyReq.setHeader('origin', 'https://company.citupro.com:18183')
|
|
|
+ // }
|
|
|
+ // },
|
|
|
+ // pathRewrite: {
|
|
|
+ // '^/op/base/api': '/op/base/api'
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
},
|
|
|
configureWebpack: config => {
|
|
|
config.devtool = 'source-map'
|