From 60a4f9220ff7d00d1514914c63c768aea13e8097 Mon Sep 17 00:00:00 2001 From: namutaka Date: Sat, 13 Aug 2016 14:51:09 +0900 Subject: [PATCH] Remove hostname check --- example/config.json | 1 - lib/bots.js | 6 ------ 2 files changed, 7 deletions(-) diff --git a/example/config.json b/example/config.json index 726e00e..4fb2479 100644 --- a/example/config.json +++ b/example/config.json @@ -2,7 +2,6 @@ "port": 5000, "bots": { "github": { - "hostname": "github.com", "token": "YOUR_TOKEN", "route": "/github/hooks/:roomid" } diff --git a/lib/bots.js b/lib/bots.js index c67e462..9df4254 100644 --- a/lib/bots.js +++ b/lib/bots.js @@ -15,12 +15,6 @@ fs.readdirSync(path.join(process.cwd(), 'bots')).forEach(function (botfile) { config = require(cwd + '/config'), bot = require(cwd + '/bots/' + botname); - if (req.headers.host !== config.bots[botname].hostname) { - res.statusCode = 404; - res.end(); - return; - } - // chatwork client initialize. cw.init({ token: config.bots[botname].token });