disabled announce access from browser

This commit is contained in:
OldHawk
2017-04-17 17:21:42 +08:00
parent dfcfc6db48
commit fe9dfcd90c
2 changed files with 6 additions and 2 deletions

View File

@@ -36,7 +36,11 @@ module.exports = {
]
},
clientBlackList: [
{name: 'Transmission/2.93'}
{name: 'Transmission/2.93'},
{name: 'Mozilla'},
{name: 'AppleWebKit'},
{name: 'Safari'},
{name: 'Chrome'}
],
torrentSalesType: {
name: 'SALESTYPE',

View File

@@ -214,7 +214,7 @@ exports.announce = function (req, res) {
var inlist = false;
if (ua) {
config.meanTorrentConfig.clientBlackList.forEach(function (client) {
if (client.name.toUpperCase() === ua.toUpperCase()) {
if (ua.toUpperCase().indexOf(client.name.toUpperCase()) >= 0) {
inlist = true;
}
});