An open API service indexing awesome lists of open source software.

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.

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