Skip to content

Commit

Permalink
Fix MSIE detection in User-Agent
Browse files Browse the repository at this point in the history
  • Loading branch information
Dean Gelber committed May 2, 2012
1 parent 0ddc201 commit 9e5a289
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion node/node.js
Expand Up @@ -22,7 +22,7 @@ h5bp.ieEdgeChromeFrameHeader = function () {
var url = req.url,
ua = req.headers['user-agent'];

if (ua && ua.indexOf('MSIE') && /html?($|\?|#)/.test(url)) {
if (ua && ua.indexOf('MSIE') > -1 && /html?($|\?|#)/.test(url)) {
res.setHeader('X-UA-Compatible', 'IE=Edge,chrome=1');
}
next();
Expand Down

0 comments on commit 9e5a289

Please sign in to comment.