1.修改代码适配阿里云的服务器
This commit is contained in:
3
admin/.env.development
Normal file
3
admin/.env.development
Normal file
@@ -0,0 +1,3 @@
|
||||
# 开发环境:API 请求走域名,不用 localhost
|
||||
VITE_APP_DOMAIN=https://yuheng.yuxindazhineng.com
|
||||
VITE_API_BASE=https://yuheng.yuxindazhineng.com
|
||||
@@ -7,10 +7,12 @@ export default defineConfig({
|
||||
server: {
|
||||
port: 3000,
|
||||
host: true,
|
||||
// 开发时 /api 也走域名(与 .env.development 中 VITE_API_BASE 一致)
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: 'http://localhost:8080',
|
||||
changeOrigin: true
|
||||
target: 'https://yuheng.yuxindazhineng.com',
|
||||
changeOrigin: true,
|
||||
secure: true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user