cors-server

Command line script that will start a web server that will proxy any request received and add CORS headers to it

Usage no npm install needed!

<script type="module">
  import corsServer from 'https://cdn.skypack.dev/cors-server';
</script>

README

About

cors-server is a command line script that will start a web server on a given port that will proxy any request received and add CORS headers to it.

Installation

Type npm install -g cors-server on the command line.

Usage

To start the server simply call it from the command line and supply a port number

cors-server <port>

After that, any requests sent to http://localhost:[port] will have Access-Control-Allow-Origin: * on the response.

e.g:

POST http://localhost:3005/http://www.google.com