Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/webtorrent/webtorrent.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFeross Aboukhadijeh <feross@feross.org>2014-12-31 09:25:09 +0300
committerFeross Aboukhadijeh <feross@feross.org>2014-12-31 12:08:01 +0300
commit889e04156709321ff694679b7ea064f18bbb08e3 (patch)
treea6e58dc3875b8168f2a34e4d9e3afa5e0674eadb /index.js
parent5f8482e1eed7c22f51e08db52abe2d4358f04b9a (diff)
Use 'WebTorrent' user-agent for http requests
Fixes #229
Diffstat (limited to 'index.js')
-rw-r--r--index.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/index.js b/index.js
index 4a62766..0ccc4bb 100644
--- a/index.js
+++ b/index.js
@@ -79,7 +79,9 @@ function WebTorrent (opts) {
debug('new webtorrent (peerId %s, nodeId %s)', self.peerIdHex, self.nodeIdHex)
if (typeof loadIPSet === 'function') {
- loadIPSet(opts.blocklist, function (err, ipSet) {
+ loadIPSet(opts.blocklist, {
+ headers: { 'user-agent': 'WebTorrent (http://webtorrent.io)' }
+ }, function (err, ipSet) {
self.blocked = ipSet
ready()
})