Skip to content

Commit 20d1439

Browse files
committed
http server: support announce at /
1 parent 85b7c60 commit 20d1439

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,7 @@ Server.prototype._onHttpRequest = function (req, res) {
585585
return error('bittorrent-tracker server only supports announcing one torrent at a time')
586586
}
587587

588-
if (s[0] === '/announce') {
588+
if (s[0] === '/announce' || s[0] === '/') {
589589
var ip = self._trustProxy
590590
? req.headers['x-forwarded-for'] || req.connection.remoteAddress
591591
: req.connection.remoteAddress.replace(REMOVE_IPV6_RE, '') // force ipv4

0 commit comments

Comments
 (0)