We need to enable CORS throughout our express server so that the frontend will be able to retrieve data from a separate origin.
Acceptance criteria:
Install the cors middleware and enable it throughout the whole express server via app.use()
https://www.npmjs.com/package/cors
Also enable the cors pre-flight request across the whole API via:
app.options('*', cors()) // include before other routes
We need to enable CORS throughout our express server so that the frontend will be able to retrieve data from a separate origin.
Acceptance criteria:
Install the cors middleware and enable it throughout the whole express server via app.use() https://www.npmjs.com/package/cors Also enable the cors pre-flight request across the whole API via:
app.options('*', cors()) // include before other routes