vector-engineering / covidcg

A COVID-19 CoV Genetics (CG) browser to inform therapeutics development
https://covidcg.org
MIT License
26 stars 5 forks source link

CORS fix #421

Closed a13xk13m closed 2 years ago

a13xk13m commented 3 years ago

This fix includes adding FRONTEND_PORT env variable to docker-compose and is used to add localhost to CORS list for local production. I believe the reason it wasn't working before is because the CORS for production was genbank.covidcg.org rather than just covidcg.org. I hardcoded covidcg.org in for now as the production hostname is pulled from config.yaml which seems to be a deployment only file. This is currently a blanket CORS implementation, so if there are some endpoints that should be exposed that can be pretty easily added.

a13xk13m commented 3 years ago

Issue #410

atc3 commented 3 years ago

Shouldn't we disable CORS in development mode? To enable for easier debugging via. Postman or other HTTP debugging clients.

Otherwise this PR looks good

atc3 commented 2 years ago

Nvm, talked about this and decided to leave enabled for local dev, since Postman clients don't respect CORS anyways.