Open Pyroglyph opened 1 year ago
After more investigating, it appears that the connection
property is not present on req
when this is run through Deno.
Simply changing this line
var isRequestedOverHttps = req.connection.encrypted || /^\s*https/.test(req.headers['x-forwarded-proto']);
to this
var isRequestedOverHttps = req.connection?.encrypted || /^\s*https/.test(req.headers['x-forwarded-proto']);
^
should solve the issue.
Simple usage does not work at all in Deno. Every request ends in the same TypeError.
Example using PokeAPI:
Result:
Not even the sample URLs given in the readme work. Navigating to
/
works if you launch Deno with--allow-read
, and so does/iscorsneeded
. Nothing else works though.