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/', '/');