https://github.com/rawleyfowler/mojolicious-plugin-isbot
Determine if a request originated from a bot.
https://github.com/rawleyfowler/mojolicious-plugin-isbot
Last synced: about 1 year ago
JSON representation
Determine if a request originated from a bot.
- Host: GitHub
- URL: https://github.com/rawleyfowler/mojolicious-plugin-isbot
- Owner: rawleyfowler
- License: artistic-2.0
- Created: 2023-09-17T16:26:54.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-11-03T15:29:59.000Z (over 2 years ago)
- Last Synced: 2025-02-13T08:54:22.443Z (over 1 year ago)
- Language: Perl
- Homepage:
- Size: 13.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
- License: LICENSE
Awesome Lists containing this project
README
Mojolicious::Plugin::IsBot
A super simple Mojolicious plugin to test if a User-Agent header is possbily a bot.
use Mojolicious::Lite -signatures;
plugin('IsBot');
get '/' => sub {
my $s = shift;
return $s->render(text => 'You are bot!') if $s->req->is_bot;
$s->render(text => 'You are not bot!');
};
app->start;
# LICENSE
This project is licensed under the Artistic 2.0