diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/config.js | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/config.js b/lib/config.js index 7028f29a..6738d4a8 100644 --- a/lib/config.js +++ b/lib/config.js @@ -63,10 +63,13 @@ var dropbox = config.dropbox || false; var imgur = config.imgur || false; function getserverurl() { - var protocol = protocolusessl ? 'https://' : 'http://'; - var url = protocol + domain; - if (urladdport && ((usessl && port != 443) || (!usessl && port != 80))) - url += ':' + port; + var url = ''; + if (domain) { + var protocol = protocolusessl ? 'https://' : 'http://'; + url = protocol + domain; + if (urladdport && ((usessl && port != 443) || (!usessl && port != 80))) + url += ':' + port; + } if (urlpath) url += '/' + urlpath; return url; |