Skip to content

Commit 6004620

Browse files
committed
Update to support when domain not provided will use relative path
1 parent ff4698c commit 6004620

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

lib/config.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,13 @@ var dropbox = config.dropbox || false;
6363
var imgur = config.imgur || false;
6464

6565
function getserverurl() {
66-
var protocol = protocolusessl ? 'https://' : 'http://';
67-
var url = protocol + domain;
68-
if (urladdport && ((usessl && port != 443) || (!usessl && port != 80)))
69-
url += ':' + port;
66+
var url = '';
67+
if (domain) {
68+
var protocol = protocolusessl ? 'https://' : 'http://';
69+
url = protocol + domain;
70+
if (urladdport && ((usessl && port != 443) || (!usessl && port != 80)))
71+
url += ':' + port;
72+
}
7073
if (urlpath)
7174
url += '/' + urlpath;
7275
return url;

0 commit comments

Comments
 (0)