Came across this when trying to use helmet with opine. Helmet uses res.setHeader in its middleware that it applies, which produces an error with opine
Setup:
Deno Version: 1.11.0
v8 Version: v8 9.1.269.35
Typescript Version: 4.3.2
Opine Version: 1.4.0
Helmet version: 4.6.0
Details
In express/node, res.setHeader comes from node's http.Response object, and res.set eventually calls into that. With deno/opine, I believe res.setHeader could just be made an alias for res.set, sort of the reverse of the relationship in node/express, but achieves the same api.
edit: clarification on where res.setHeader is derived from
Issue
Came across this when trying to use
helmet
withopine
. Helmet usesres.setHeader
in its middleware that it applies, which produces an error withopine
Setup:
Deno Version: 1.11.0
v8 Version: v8 9.1.269.35
Typescript Version: 4.3.2
Opine Version: 1.4.0
Helmet version: 4.6.0
Details
In express/node,
res.setHeader
comes from node'shttp.Response
object, and res.set eventually calls into that. With deno/opine, I believeres.setHeader
could just be made an alias forres.set
, sort of the reverse of the relationship in node/express, but achieves the same api.edit: clarification on where res.setHeader is derived from