Skip to content

Commit

Permalink
429 this random japanese private school
Browse files Browse the repository at this point in the history
  • Loading branch information
jfhbrook committed Apr 1, 2017
1 parent 2d6907b commit c42b2c4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ var singular = require('./singular'),

app.routes = new express.Router();

app.use(function (req, res, next) {
if (/nnn\.ed\.jp/.test(req.headers['referer'])) {
res.statusCode = 429
return res.end('too many requests');
}
next();
});

//
// Add static assets
//
Expand Down

0 comments on commit c42b2c4

Please sign in to comment.