CodeforNepal / akshara-project

Sangraha is an initiative to promote the usage of native langauge in computing and literature
https://www.sangraha.org/
GNU General Public License v3.0
16 stars 7 forks source link

Work in Progress - Attempting to bypass cors locally #43

Closed aishraj closed 5 years ago

aishraj commented 6 years ago

@anupdhml I'll need your help with this. Currently this branch does not run. The intention of this branch/pull request is to make it easy to develop only the frontend without running the entire stack. The idea was to have a docker-compose file for the frontend that has an NginX that bypasses the CORS request and allows connecting to the production http://sangraha.org/es. Currently despite of doing this the CORS issues are still around.

anupdhml commented 6 years ago

The setup here looks fine but the issue seems to be with how our prod nginx setup was blocking OPTIONS requests needed for successful cors.

I have opened up a PR fixing it: https://github.com/Code4Nepal/akshara-project/pull/45

Right now, our elasticsearch setup itself allows cors so that PR works for what we want here. This setup is still going to be useful though if we want tighter control on elasticsearch requests. Let's talk more about it in the meeting.

tux4 commented 5 years ago

@aishraj Is it okay to close this PR? Since for now we have a working fix using the changes to production ngnix config?