aboutsummaryrefslogtreecommitdiff
path: root/lib/app.js
diff options
context:
space:
mode:
authorcel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2018-09-04 17:21:01 -0700
committercel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2018-09-06 14:14:12 -0700
commit471c40a1310d3ca0bc6d8c220c4c174543a8c510 (patch)
treeb7d375601c158491735ca7fc8dde34757d8087c0 /lib/app.js
parentc6f15ea06c6c21c6ce2e19c04fdfc7fe815a6bc4 (diff)
downloadpatchfoo-471c40a1310d3ca0bc6d8c220c4c174543a8c510.tar.gz
patchfoo-471c40a1310d3ca0bc6d8c220c4c174543a8c510.zip
Fix IPv6 URL
Diffstat (limited to 'lib/app.js')
-rw-r--r--lib/app.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/app.js b/lib/app.js
index 8b6d897..c647d39 100644
--- a/lib/app.js
+++ b/lib/app.js
@@ -36,6 +36,9 @@ function App(sbot, config) {
this.previewContacts = conf.previewContacts == null ? false : conf.previewContacts
this.useOoo = conf.ooo == null ? false : conf.ooo
+ var host1 = /:/.test(this.host) ? '[' + this.host + ']' : this.host
+ this.baseUrl = 'http://' + host1 + ':' + this.port
+
var base = conf.base || '/'
this.opts = {
base: base,