Issue with Gradebook MFE in Open edX Quince Release

Hi Everyone,

I recently installed the Open edX open-release/quince.1 using Tutor, version 17.0.1. We have not made any customizations to the platform. To use an external SSL certificate, we adjusted the following parameters:

tutor config save --set ENABLE_WEB_PROXY=false --set CADDY_HTTP_PORT=81
tutor config save --set ENABLE_HTTPS=true
tutor local launch

We then set up SSL using Nginx. Everything is functioning correctly, including the MFEs, except for an issue in the gradebook MFE.

The problem occurs when viewing a course with over 100 learners. After opening the gradebook and clicking on the next page, the following error appears in the browser console:

grades.js:103 Mixed Content: The page at 'https://apps.class.xxxx.com/gradebook/course-v1:liceodecagayanuniversity+MLS1AS02+Summer2024' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://class.xxxx.com/api/grades/v1/gradebook/course-v1:liceodecagayanuniversity+MLS1AS02+Summer2024/?cursor=cD03MjA%3D&excluded_course_roles=all&page_size=25'. This request has been blocked; the content must be served over HTTPS.

It seems that the request to the grades API is being made over HTTP instead of HTTPS, causing a mixed content error.

Did I miss any configuration steps? How can I fix this issue to ensure all API requests are served over HTTPS?

Thank you for your help!

Hey, @Mahendra I am sorry you have to face this, can you see what is the value of MFE_CONFIG in your LMS container?

You can exec in your LMS container with.

tutor local exec lms bash

and then in the shell ```./manage.py lms shell``

In [1]: from django.conf import settings

In [2]: settings.MFE_CONFIG

Here you need to look at LMS_BASE and see if that is set correctly.

EDIT 1:

I dug a bit more and I figured out that the issue will be with the paginated URL that LMS is returning, I have tried it with one of our deployed instances I tried accessing

<LMS_URL>/api/grades/v1/gradebook/course-v1%3ATEST_01%2BTEST_101%2BQ11/?excluded_course_roles=all&page_size=1

You need to look into the next key it should be returning an HTTPS URL and if it is not then that is the issue we need to debug.

A possible solution will be to set or check SECURE_PROXY_SSL_HEADER, have look at configuring web proxy.

Hi @farhaanbukhsh

Thanks for your response. Now it’s solved. As you mentioned my all settings were fine. I updated X-Forwarded-Proto header to https for secure requests in nginx file.

Here is the complete code of nginx file:

server {
   listen 80 default;
   return 301 https://$host$request_uri;
}


server {
        listen 443 ssl default;
        ssl_certificate <SSL CERTIFICATE PATH>;
        ssl_certificate_key <SSL CERTIFICATE KEY PATH>;

        location / {
            proxy_pass http://localhost:81;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-Proto https;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        }
}

Thanks again.

1 Like