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