fix: build and git

This commit is contained in:
louis 2024-03-28 13:24:46 +08:00
parent ff5bb2a2ec
commit 59831c32ba
3 changed files with 5 additions and 3 deletions

View File

@ -1,6 +1,8 @@
#!/bin/bash
# 拉取最新的代码
git config core.fileMode false
echo "Pulling latest code..."
git pull

View File

@ -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;

View File

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