mirror of
https://github.com/webtorrent/bittorrent-tracker.git
synced 2025-02-21 20:59:02 +00:00
http server: support announce at /
This commit is contained in:
parent
85b7c606b9
commit
20d14391d5
2
index.js
2
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
|
||||
|
Loading…
Reference in New Issue
Block a user