From 838eb3971f1c854f61ef04589e7cdb6c8fe0f68c Mon Sep 17 00:00:00 2001 From: blacklee123 <15656564262@163.com> Date: Tue, 13 Aug 2024 16:50:42 +0800 Subject: [PATCH] refactor: remove unnessary code --- replace.sh | 2 -- src/http/axios.js | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/replace.sh b/replace.sh index 4e0b27a4..2b6d1234 100644 --- a/replace.sh +++ b/replace.sh @@ -1,4 +1,2 @@ nohup google-chrome --remote-debugging-address=0.0.0.0 --remote-debugging-port=9222 --no-sandbox --disable-dev-shm-usage --headless --disable-gpu >/dev/null 2>&1 & -sed -i "s/SONIC_SERVER_HOST/${SONIC_SERVER_HOST}/g" /usr/share/nginx/html/assets/*.js -sed -i "s/SONIC_SERVER_PORT/${SONIC_SERVER_PORT}/g" /usr/share/nginx/html/assets/*.js /usr/sbin/nginx -c /etc/nginx/nginx.conf -g 'daemon off;' diff --git a/src/http/axios.js b/src/http/axios.js index 59038163..2cb12025 100644 --- a/src/http/axios.js +++ b/src/http/axios.js @@ -26,7 +26,7 @@ if (process.env.NODE_ENV === 'development') { baseURL = 'http://localhost:3000/server/api'; } if (process.env.NODE_ENV === 'production') { - baseURL = 'http://SONIC_SERVER_HOST:SONIC_SERVER_PORT/server/api'; + baseURL = '/server/api'; } const $http = axios.create(); baseURL = baseURL.replace(':80/', '/');