Created
July 1, 2013 22:44
-
-
Save yocontra/5905284 to your computer and use it in GitHub Desktop.
Filters idiots and business people from using your web page
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = (req, res, next) -> | |
ua = req.get 'user-agent' | |
return next() if !ua or /[cC]hrome\/([\d\w\.\-]+)/i.test ua | |
res.redirect "https://www.google.com/intl/en/chrome/browser/beta.html" | |
res.end() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment