boilerplate for res.setHeader, protection from being overridden