Skip to main content


$ deno run --allow-net

Instead of fetching you can now fetch http://localhost:3000/cors/


You can configure the port, route, allowed URLs and allowed origins of the server via these arguments:

$ deno run --help
This CORS proxy fetches remote URLs and adds CORS headers so that blocked Cross-Origin requests belong to the past.

You can adjust the following settings when using this module:
  -p, --port, env: PORT
    Port - set the port for your server (number)
    Default: 3000

  -r, --route, env: CORS_ROUTE_PREFIX
    Route to serve requests, i.e. <your-server-url>:<port><route><requested-url>
    Default: "/cors/"

  -u, --allowed-urls, env: ALLOWED_URLS
    URLs to serve - set URLs you want to be able to forward (comma separated list, e.g. ",")
    Default: "" ("" = all URLs are allowed)

  -o, --allowed-origins, env: ALLOWED_ORIGINS
    Value for Access-Control-Allow-Origin header
    Default: "*" ("*" = all origins are allowed)

Example usage

$ deno run --allow-net \
    --port 1337 \
    --allowed-urls, \