kopia lustrzana https://github.com/backface/turtlestitch
commit
c3fa882cd8
6
cloud.js
6
cloud.js
|
|
@ -67,11 +67,13 @@ Cloud.prototype.determineCloudDomain = function () {
|
|||
// 2. The current page's domain
|
||||
var currentDomain = window.location.host, // host includes the port.
|
||||
metaTag = document.head.querySelector("[name='snap-cloud-domain']"),
|
||||
cloudDomain = this.defaultDomain;
|
||||
cloudDomain = this.defaultDomain,
|
||||
domainMap = this.knownDomains;
|
||||
|
||||
if (metaTag) { return metaTag.getAttribute('location'); }
|
||||
|
||||
Object.values(this.knownDomains).some(function (server) {
|
||||
Object.keys(domainMap).some(function (name) {
|
||||
var server = domainMap[name];
|
||||
if (Cloud.isMatchingDomain(currentDomain, server)) {
|
||||
cloudDomain = server;
|
||||
return true;
|
||||
|
|
|
|||
Ładowanie…
Reference in New Issue