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 url = '';
|
||||||
|
if (domain) {
|
||||||
var protocol = protocolusessl ? 'https://' : 'http://';
|
var protocol = protocolusessl ? 'https://' : 'http://';
|
||||||
var url = protocol + domain;
|
url = protocol + domain;
|
||||||
if (urladdport && ((usessl && port != 443) || (!usessl && port != 80)))
|
if (urladdport && ((usessl && port != 443) || (!usessl && port != 80)))
|
||||||
url += ':' + port;
|
url += ':' + port;
|
||||||
|
}
|
||||||
if (urlpath)
|
if (urlpath)
|
||||||
url += '/' + urlpath;
|
url += '/' + urlpath;
|
||||||
return url;
|
return url;
|
||||||
|
|
Loading…
Reference in New Issue