Revert "Remove the SCHEME_AND_DOMAIN constant."

This reverts commit 8ddb9cfcb6.
This commit is contained in:
Ms2ger 2015-06-12 10:43:19 +02:00
parent 230c4201f3
commit 2212cacef2
7 changed files with 15 additions and 9 deletions

View file

@ -1,12 +1,18 @@
//This file requires server-side substitutions and must be included as constants.js?pipe=sub
//This file requires server-side substitutions and must be included as constants.js?pipe=config
var DOMAIN_FOR_WS_TESTS = "{{host}}";
var DOMAIN_FOR_WSS_TESTS = "{{host}}";
var PORT = "{{ports[ws][0]}}";
//FIXME: Add support for wss
var PORT_SSL = "{{ports[ws][0]}}";
// logic for using wss URLs instead of ws
var SCHEME_AND_DOMAIN;
var SCHEME_DOMAIN_PORT;
if (location.search == '?wss') {
SCHEME_DOMAIN_PORT = 'wss://{{host}}:' + PORT_SSL;
SCHEME_AND_DOMAIN = 'wss://'+DOMAIN_FOR_WSS_TESTS;
SCHEME_DOMAIN_PORT = SCHEME_AND_DOMAIN + ":" + PORT_SSL;
} else {
SCHEME_DOMAIN_PORT = 'ws://{{host}}:' + PORT;
SCHEME_AND_DOMAIN = 'ws://'+DOMAIN_FOR_WS_TESTS;
SCHEME_DOMAIN_PORT = SCHEME_AND_DOMAIN + ":" + PORT;
}