changed indexOf to includes
This commit is contained in:
parent
6d071ae034
commit
5cad30068f
1 changed files with 1 additions and 1 deletions
|
@ -8,7 +8,7 @@ function headersMatchesSocialBotList (headers) {
|
|||
'Twitterbot',
|
||||
];
|
||||
for (let i = 0; i < socialBotList.length; i++) {
|
||||
if (userAgent.indexOf(socialBotList[i]) >= 0) {
|
||||
if (userAgent.includes(socialBotList[i])) {
|
||||
logger.debug('request is from social bot:', socialBotList[i]);
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue