mirror of https://github.com/status-im/codimd.git
Update to support when domain not provided will use relative path
This commit is contained in:
parent
ff4698caf5
commit
60046200f8
|
@ -63,10 +63,13 @@ var dropbox = config.dropbox || false;
|
||||||
var imgur = config.imgur || false;
|
var imgur = config.imgur || false;
|
||||||
|
|
||||||
function getserverurl() {
|
function getserverurl() {
|
||||||
var protocol = protocolusessl ? 'https://' : 'http://';
|
var url = '';
|
||||||
var url = protocol + domain;
|
if (domain) {
|
||||||
if (urladdport && ((usessl && port != 443) || (!usessl && port != 80)))
|
var protocol = protocolusessl ? 'https://' : 'http://';
|
||||||
url += ':' + port;
|
url = protocol + domain;
|
||||||
|
if (urladdport && ((usessl && port != 443) || (!usessl && port != 80)))
|
||||||
|
url += ':' + port;
|
||||||
|
}
|
||||||
if (urlpath)
|
if (urlpath)
|
||||||
url += '/' + urlpath;
|
url += '/' + urlpath;
|
||||||
return url;
|
return url;
|
||||||
|
|
Loading…
Reference in New Issue