I deploy Tutor (olive.1) in Kubernetes. I build the project with HTTPS enabled globally (The argument “ENABLE_HTTPS: true” is defined in the global configuration file ~/.local/share/tutor/config.yml). In general I’ve no issues with using HTTPS in the project except authentication in Studio.
For example if I go to the studio url “https://studio.lms.mysite.com” and click on the “Sign in” button it sends me to the url “https://studio.lms.mysite.com/login/?next=http://studio.lms.mysite.com/”. As you can see it redirects me to HTTP instead of HTTPS in the “next=”.
Can you please help me to fix this problem? I tried to rebuild the project again with “ENABLE_HTTPS: true”. I checked there’re no references to “http://” in the ~/.local/share/tutor/env/apps/openedx/settings/cms/production.py, ~/.local/share/tutor/env/apps/openedx/settings/lms/production.py files.
[Update] Please see the below alternative solution
Unrecommend solutionI had encountred same issue to resolve, I just went to admin setting the changs the redirct url of cms-sso.
- got to
- choose cms-sso from the list
Redirect urisscheme from
- save, and try to login from studio again.
My vauge understanding of why this is happening:
It that when you are try to access to studio, django would still thinks your using
http when it gets
requst.path which is used probably to create session/token. So it sets redirect-url/next with
http though tutor when created the django-dot-application used
</End of Unrecommend solutoin>
Alternative and better solution:
Make sure your proxy server set these header, in my the case I use, nginx and the following were essetinals
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto https;
- Set the following headers appropriately: