{"action":"opened","issue":{"url":"https://api.github.com/repos/helmetjs/dont-sniff-mimetype/issues/1","labels_url":"https://api.github.com/repos/helmetjs/dont-sniff-mimetype/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/helmetjs/dont-sniff-mimetype/issues/1/comments","events_url":"https://api.github.com/repos/helmetjs/dont-sniff-mimetype/issues/1/events","html_url":"https://github.com/helmetjs/dont-sniff-mimetype/issues/1","id":55297195,"number":1,"title":"Save some memory by defining the middleware function once","user":{"login":"EvanHahn","id":777712,"avatar_url":"https://avatars.githubusercontent.com/u/777712?v=3","gravatar_id":"","url":"https://api.github.com/users/EvanHahn","html_url":"https://github.com/EvanHahn","followers_url":"https://api.github.com/users/EvanHahn/followers","following_url":"https://api.github.com/users/EvanHahn/following{/other_user}","gists_url":"https://api.github.com/users/EvanHahn/gists{/gist_id}","starred_url":"https://api.github.com/users/EvanHahn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EvanHahn/subscriptions","organizations_url":"https://api.github.com/users/EvanHahn/orgs","repos_url":"https://api.github.com/users/EvanHahn/repos","events_url":"https://api.github.com/users/EvanHahn/events{/privacy}","received_events_url":"https://api.github.com/users/EvanHahn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-01-23T15:52:47Z","updated_at":"2015-01-23T15:52:47Z","closed_at":null,"body":"This would probably save a bit of memory:\r\n\r\n```js\r\nvar middleware = function nosniff(req, res, next)  {\r\n  res.setHeader('X-Content-Type-Options', 'nosniff');\r\n  next();\r\n};\r\n\r\nmodule.exports = function nosniff() {\r\n  return middleware;\r\n};\r\n```\r\n\r\nThis would only make a difference if you were using the middleware many times...probably not worth it. Anyone have any thoughts?"}}