1👍
Allow CORS requests from the server
With the Access-Control-Allow-Origin header, you can specify what origins can use your API.
app.get('/api', (req, res) => {
res.set('Access-Control-Allow-Origin', 'http://localhost:3000');
res.send({
api: "your request."
});
})
-1👍
Allow CORS from the app’s origin on the server (api).
This has nothing to do with with the client (app)
Source:stackexchange.com