CORSmirror is a RESTful API that provides a proxy to websites with CORS enabled.
The web service is built with:
The RESTful API is as follows:
fetch('https://corsmirror.onrender.com/v1/cors?url=http://example.com') .then((response) => response.text()) .then((data) => console.log(data));
You can also pass additional query strings that sets or overrides the response header fields:
fetch( 'https://corsmirror.onrender.com/v1/cors?url=http://example.com&content-type=text/plain' ) .then((response) => response.headers.get('content-type')) .then((data) => console.log(data));
There are certain fields like
Content-Lengththat cannot be overridden.
Clone the repository:
git clone https://github.com/CORSmirror/CORSmirror.git cd CORSmirror
Install the dependencies:
Start the development server:
npm run dev
Start the production server:
npm run lint
This is an open source project so feel free to fork the repository. Contributions are welcome!