feat: ds
This commit is contained in:
@@ -62,6 +62,7 @@
|
||||
if (ex && ex.host) {
|
||||
var tls = !!(ex.tls || ex.prefer_https);
|
||||
var port = Number(tls ? (ex.https_port || 443) : (ex.http_port || 80)) || (tls ? 443 : 80);
|
||||
if (!tls && port === 443) { tls = true; }
|
||||
var origin = (tls ? 'https://' : 'http://') + hostOnly(ex.host);
|
||||
if (!((tls && port === 443) || (!tls && port === 80))) origin += ':' + port;
|
||||
return origin;
|
||||
@@ -137,7 +138,7 @@
|
||||
http_port: (location.port && Number(location.port)) || (location.protocol === 'https:' ? 443 : 80),
|
||||
https_port: (location.port && Number(location.port)) || (location.protocol === 'https:' ? 443 : 80),
|
||||
tls: location.protocol === 'https:',
|
||||
prefer_https: false,
|
||||
prefer_https: location.protocol === 'https:',
|
||||
});
|
||||
api = apiBase();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user