You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// cors.tsimportcorsProxyfrom'npm:cors-anywhere';corsProxy.createServer().listen(8080,'localhost',()=>{console.log('Running CORS Anywhere');fetch('http://localhost:8080/pokeapi.co:443/api/v2/');});
Result:
❯ deno run --allow-net cors.ts
Running CORS Anywhere
TypeError: Cannot read properties of undefined (reading 'encrypted')
at ServerImpl.<anonymous> (file:///home/pyro/.cache/deno/npm/registry.npmjs.org/cors-anywhere/0.4.4/lib/cors-anywhere.js:384:47)
at ServerImpl.emit (https://deno.land/[email protected]/node/_events.mjs:379:28)
at https://deno.land/[email protected]/node/http.ts:634:16
at new Promise (<anonymous>)
at handler (https://deno.land/[email protected]/node/http.ts:632:16)
at Object.serve (internal:ext/flash/01_http.js:572:24)
at async Promise.all (index 0)
at async serve (internal:ext/flash/01_http.js:688:7)
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.
The text was updated successfully, but these errors were encountered:
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.The text was updated successfully, but these errors were encountered: