SocialHackersClass10 / ChalleduApp

This repository contains the Code of the project, ChalleduApp, as a result of the collaboration between SHA-students of Class 10 & Challedu.com.
1 stars 5 forks source link

Add CORS support to our express server #60

Closed zannis closed 4 years ago

zannis commented 4 years ago

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

student0b4dc0d3 commented 4 years ago

State: pending PR Please review and comment or resolve Thank you