Skip to content

Commit

Permalink
fix: change config
Browse files Browse the repository at this point in the history
  • Loading branch information
SmallTeddy committed Dec 7, 2023
1 parent f44821e commit 88d1619
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import AutoImport from 'unplugin-auto-import/vite'
const ENV = 'dev'
const url = {
dev: 'https://dev.testing.com',
uat: 'https://uat.testing.com',
uat: 'https://smallteddy.github.io/',
}
const ROOT_URL = url[ENV]

Expand Down Expand Up @@ -75,18 +75,18 @@ export default defineConfig(({ mode, command }) => {
proxy: {
// https://cn.vitejs.dev/config/#server-proxy
// 以下为k8s相关测试服务地址
// '/xxx/': {
// target: ROOT_URL, // 用户统一认证
// ws: false, // 禁用WebSocket
// changeOrigin: true, // 修改请求头中的Origin为目标URL
// rewrite: path => path.replace(/^\/xxx/, ''), // 重写请求,去掉前缀
// // 绕过代理请求的处理函数
// bypass(req, res, proxyOptions) {
// // 转发到后端的路径
// const proxyUrl = proxyOptions.target + proxyOptions.rewrite(req.url)
// console.log(`proxyUrl:${proxyUrl}`) // 打印代理的URL
// },
// },
'/': {
target: 'https://smallteddy.github.io/', // 用户统一认证
// ws: false, // 禁用WebSocket
changeOrigin: true, // 修改请求头中的Origin为目标URL
// rewrite: path => path.replace(/^\//, ''), // 重写请求,去掉前缀
// 绕过代理请求的处理函数
// bypass(req, res, proxyOptions) {
// // 转发到后端的路径
// const proxyUrl = proxyOptions.target + proxyOptions.rewrite(req.url)
// console.log(`proxyUrl:${proxyUrl}`) // 打印代理的URL
// },
},
},
},
}
Expand Down

0 comments on commit 88d1619

Please sign in to comment.