summaryrefslogtreecommitdiffstats
path: root/src/app/networking/NetworkConstants.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/app/networking/NetworkConstants.js')
-rw-r--r--src/app/networking/NetworkConstants.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/app/networking/NetworkConstants.js b/src/app/networking/NetworkConstants.js
index 1bc5eb0..8f0de17 100644
--- a/src/app/networking/NetworkConstants.js
+++ b/src/app/networking/NetworkConstants.js
@@ -31,4 +31,11 @@ export const NO_RESULTS_FOUND = 'No Results Found';
const BACKEND_IP_ADDRESS = document.location.hostname;
const BACKEND_PORT_NUMBER = window.location.port;
const PROTOCOL = window.location.protocol;
-export const BASE_URL = PROTOCOL + '//' + BACKEND_IP_ADDRESS + ':' + BACKEND_PORT_NUMBER;
+var base = '';
+var url = window.location.href;
+if(url.includes('ecompc_')){
+ base = PROTOCOL + '//' + BACKEND_IP_ADDRESS + '/' + url.split('/')[3];
+}else{
+ base = PROTOCOL + '//' + BACKEND_IP_ADDRESS + ':' + BACKEND_PORT_NUMBER;
+}
+export const BASE_URL = base;