Skip to content

rawleyfowler/mojolicious-plugin-IsBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Determine if a request originated from a bot.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages