Package | are-you-a-cop |
Description | Blocks cops from visiting your site. If they are they have to tell you. |
Node Version | >= 0.10 |
var copCheck = require('are-you-a-cop');
var express = require('express');
var app = express();
app.use(copCheck(false));
app.get('/safezone', function(req, res, next){
});
Want to allow cops but still mark the request as .cop = true
? Set the allow
param to true.
app.use(copCheck(true));
Around the world there is one universal constant: If you ask a cop if they are a cop, they have to tell you. What this module does is attach an "X-Are-You-A-Cop" header (RFC520520) to each response. If the requesting party sends back a "X-I-Am-A-Cop" header the request will be flagged as a cop, and you can choose to allow or deny it. Normal users will not be affected by this, but all cops will need to modify their browser to send this legally mandated header.
This is satire.