Download or clone the repo:
git clone https://github.com/danielnaranjo/no-more-cors-in-dev
Install it and run:
cd no-more-cors-in-dev
npm i
npm run dev
micro
micro-fork
micro-cors
node-fetch
Micro use port 3000 by default but worry, Micro fix it ;)
GET http://127.0.0.1:3000/api?url=https://example.com/app/v1/information
POST http://127.0.0.1:3000/api HTTP/1.1
Content-Type: application/json
{
"url": "https://example.com/app/v1/doLogin",
"data" : {
"email": "[email protected]",
"password" : "123456"
}
}
OPTIONS http://127.0.0.1:3000/api HTTP/1.1
PUT
PATCH
DELETE
Deploy it to the cloud with now (download)
now
Every day I work with Angular or React in Frontend and I have to deal with CORS policy, configuration, etc. I tired to do it, So, this service fix all this crap, this script make a request to this service passing to data... No more configuration, testing, etc.
Easy plug-and-play!
Twitter: @naranjodaniel or buy a coffee
MIT