A simple local server that can proxy remotes resources and return the response with the proper Access-Control-Allow-Origin: *
cors header. Useful for local development where you don't have any control over remote resources and their cors options.
npm install
install dependeciesnpm run serve
run the server
The server has 2 parameters:
q={string}
- the url you want to proxyjson={boolean}
- (optional) will force the response to be in JSON format
The server will accept any verb (GET/POST/PUT/PATCH/DELETE) and automatically use that in the destination request.
The server transparently passes all headers to the destination. Useful for authentication.
http://localhost:1234/?q=https://baconipsum.com/api/?type=meat-and-filler