omrilotan / isbot

🤖/👨‍🦰 Detect bots/crawlers/spiders using the user agent string
https://isbot.js.org/
The Unlicense
876 stars 72 forks source link

Extending Postman does nothing #216

Closed jabranr closed 1 year ago

jabranr commented 1 year ago

I am trying to mark requests from Postman in development as a recogonized bot but it never works.

Steps to reproduce

import isbot from 'isbot';

isbot.extend(['postmanruntime', 'postman']);
isbot('PostmanRuntime/7.32.3');

Expected behaviour

isbot('PostmanRuntime/7.32.3'); // false

Actual behaviour

isbot('PostmanRuntime/7.32.3'); // true
omrilotan commented 1 year ago

Seems like it's behaving correctly

True = recognised bot

omrilotan commented 1 year ago

This user agent will also be recognised with built in pattern

https://isbot.js.org/?ua=PostmanRuntime/7.32.3

jabranr commented 1 year ago

@omrilotan Ah, I get it now. It is merely validating if it is a bot or not. I don't know why I was under the impression that it will recognize it as a browser UA when extended. Thanks for clarifying!