Gitter migration: Setup redirects (rollout pt. 3)
[gitter.git] / server / web / middlewares / unawesome-browser.js
blobc3d2972152d3234cac130d2793ddb2e25045821d
1 'use strict';
3 var useragent = require('useragent');
5 module.exports = function(req, res, next) {
6 var agent = useragent.parse(req.headers['user-agent']);
7 if (agent.family === 'IE' && agent.major < 10) {
8 res.relativeRedirect('/-/unawesome-browser');
9 } else {
10 next();