openedx-vlead / port-labs-to-openedx

3 stars 8 forks source link

Enable CORS in OpenEdx #50

Open ksripathi opened 7 years ago

ksripathi commented 7 years ago

Configure OpenEdx platform to all CORS requests form http://*.vlabs.ac.in domain

ksripathi commented 7 years ago

References : http://course-catalog-api-guide.readthedocs.io/en/latest/authentication/index.html#edx-api-authentication

http://course-catalog-api-guide.readthedocs.io/en/latest/intro_edx_apis.html

sivashankerN commented 7 years ago

When Ajax call is made to one of the vlabs.ac.in course

We have observed both access_logs and error_logs of nginx

sudo tail -f /edx/var/log/nginx/access.log, we got following

10.2.58.153 - 14.139.82.6 - - [02/Aug/2017:09:59:54 +0000] "GET /courses/course-v1:IIIT-Hyderabad+CSE04+Anytime/about HTTP/1.1" 200 8969 0.011 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0"

sudo tail -f /edx/var/log/nginx/error.log

No error logs related to xcors/Ajax call

Based on above observation, This tels us that the nginx is not blocking our Ajax request.