aboutsummaryrefslogtreecommitdiff
path: root/lib/serve.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/serve.js')
-rw-r--r--lib/serve.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/serve.js b/lib/serve.js
index c3e2115..fdf24f7 100644
--- a/lib/serve.js
+++ b/lib/serve.js
@@ -112,6 +112,12 @@ Serve.prototype.go = function () {
}
}
+ if (!this.app.isAllowedHostHeader(this.req.headers.host)) {
+ console.error('Host header not allowed: "' + this.req.headers.host + '"')
+ this.res.writeHead(403)
+ return this.res.end('Forbidden')
+ }
+
this.replyMentionFeeds = conf.replyMentionFeeds == null ? true :
Boolean(conf.replyMentionFeeds)