Switch env per request.
var koa = require('koa');
var noBot = require('koa-no-bot');
app = koa();
app.use(noBot());
Define callback to be executed.
app = koa();
var bots = [{
name: "Custom Bots"
regexp: /(bots|botts)/i
}]
app.use(noBot({ "bots": bots });
Define callback to be executed.
app = koa();
app.use(noBot({ "callback": function(bot, ua){ // Do Something } }));
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
Copyright (c) 2015 Daisuke Taniwaki. See LICENSE for details.