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`), ''),