Imagine a fusion of ‘Eskom se Push’ and ‘X’. The Republic allows users to raise concerns and spread awareness about government services through incident reports, with cool data visualizations providing a dynamic overview of public sentiment on service delivery.
This PR addresses CORS (Cross-Origin Resource Sharing) issues that were preventing proper communication between our frontend and backend, particularly in the local development environment.
Changes made:
Updated the CORS middleware in app.ts to support multiple origins
Added dynamic handling of the Access-Control-Allow-Origin header
Included both localhost:3000 and our Vercel app URL in the list of allowed origins
Ensured proper handling of preflight OPTIONS requests
Why this change is necessary:
Resolves CORS errors encountered on deployment to heroku
Description:
This PR addresses CORS (Cross-Origin Resource Sharing) issues that were preventing proper communication between our frontend and backend, particularly in the local development environment.
Changes made:
Why this change is necessary: