chore: 生产环境部署加上baseUrl

This commit is contained in:
RubyLiu 2023-08-08 14:06:17 +08:00 committed by 刘瑞斌
parent e58f383a4d
commit 2974d1196b
4 changed files with 6 additions and 6 deletions

View File

@ -1,2 +1,2 @@
VITE_API_BASE_URL= 'front'
VITE_API_BASE_URL= 'app'
VUE_APP_Access_Control_Allow_Origin= '*'

View File

@ -1 +1,2 @@
VITE_API_BASE_URL= ''
VITE_API_BASE_URL= 'app'
VUE_APP_Access_Control_Allow_Origin= '*'

View File

@ -12,10 +12,9 @@ export default mergeConfig(
strict: true,
},
proxy: {
'/front': {
'/app': {
target: 'http://172.16.200.18:8081/',
changeOrigin: true,
rewrite: (path: string) => path.replace(/^\/front/, ''),
},
},
},

View File

@ -17,8 +17,8 @@ http{
add_header X-Frame-Options "SAMEORIGIN";
try_files $uri $uri/ /index.html;
location ^~ /front/ {
proxy_pass http://172.16.200.18:8081/;
location ^~ /app/ {
proxy_pass http://172.16.200.18:8081/app/;
proxy_connect_timeout 2s;
proxy_read_timeout 600s;
proxy_send_timeout 600s;