changed indexOf to includes

This commit is contained in:
bill bittner 2018-06-29 12:34:31 -07:00
parent 6d071ae034
commit 5cad30068f

View file

@ -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;
}