cmorten / opine

Minimalist web framework for Deno ported from ExpressJS.
https://github.com/cmorten/opine/blob/main/.github/API/api.md
MIT License
854 stars 43 forks source link

res.removeHeader is not a function #128

Closed TillaTheHun0 closed 3 years ago

TillaTheHun0 commented 3 years ago

Issue

Came across this when trying to use helmet with opine. Helmet uses res.removeHeader in its middleware that it applies, which produces an error with opine

Setup:

In express/node, res.removeHeader comes from node's http.Response object, and express simply exposes it on its own embellished response object, and even calls into it in some cases. With deno/opine, I believe res.removeHeader could just be a method that removes the named header from this.headers