From 20d14391d5d7f4895c893302785517a2ecb6bc75 Mon Sep 17 00:00:00 2001 From: Feross Aboukhadijeh Date: Thu, 5 Jun 2014 23:40:37 -0700 Subject: [PATCH] http server: support announce at / --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 770a56c..441239c 100644 --- a/index.js +++ b/index.js @@ -585,7 +585,7 @@ Server.prototype._onHttpRequest = function (req, res) { return error('bittorrent-tracker server only supports announcing one torrent at a time') } - if (s[0] === '/announce') { + if (s[0] === '/announce' || s[0] === '/') { var ip = self._trustProxy ? req.headers['x-forwarded-for'] || req.connection.remoteAddress : req.connection.remoteAddress.replace(REMOVE_IPV6_RE, '') // force ipv4