From 59831c32ba60f421f49d1038e6b0a3d7ab0be3f5 Mon Sep 17 00:00:00 2001 From: louis <869322496@qq.com> Date: Thu, 28 Mar 2024 13:24:46 +0800 Subject: [PATCH] fix: build and git --- deploy.sh | 2 ++ nginx.conf | 2 +- vite.config.ts | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/deploy.sh b/deploy.sh index 9b73cf6..b5237cc 100644 --- a/deploy.sh +++ b/deploy.sh @@ -1,6 +1,8 @@ #!/bin/bash # 拉取最新的代码 +git config core.fileMode false + echo "Pulling latest code..." git pull diff --git a/nginx.conf b/nginx.conf index c6411dd..cbb1730 100644 --- a/nginx.conf +++ b/nginx.conf @@ -81,7 +81,7 @@ http { proxy_http_version 1.1; } # 文件访问 - location ^~ /upload/ { + location /upload/ { proxy_pass http://huaxin-admin-server:8001/upload/; proxy_set_header Host $proxy_host; # 修改转发请求头,让目标应用可以受到真实的请求 proxy_set_header X-Real-IP $remote_addr; diff --git a/vite.config.ts b/vite.config.ts index 2e26abc..9346a74 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -115,12 +115,12 @@ export default ({ command, mode }: ConfigEnv): UserConfig => { port: 8088, proxy: { '/api': { - target: 'http://127.0.0.1:7001', + target: 'http://127.0.0.1:8001', changeOrigin: true, rewrite: (path) => path.replace(/^\/api/, ''), }, '/upload': { - target: 'http://127.0.0.1:7001/upload', + target: 'http://127.0.0.1:8001/upload', changeOrigin: true, ws: true, rewrite: (path) => path.replace(new RegExp(`^/upload`), ''),