1. Allow to work behind port forwarding
[osm/UI.git] / skyquake / framework / utils / utils.js
index 8a54ff3..e8e9ad1 100644 (file)
@@ -189,7 +189,7 @@ Utils.setAuthentication = function(username, password, cb) {
     window.sessionStorage.setItem("auth", AuthBase64);
     self.detectInactivity();
     $.ajax({
-            url: '//' + window.location.hostname + ':' + NODE_PORT + '/check-auth?api_server=' + API_SERVER,
+            url: '//' + window.location.hostname + ':' + window.location.port + '/check-auth?api_server=' + API_SERVER,
             type: 'GET',
             beforeSend: Utils.addAuthorizationStub,
             success: function(data) {