From 0d60e7022343b992b17e4354b0a9bf2f4ac417f9 Mon Sep 17 00:00:00 2001 From: Max Sokolski Date: Fri, 27 Oct 2023 12:56:20 +0300 Subject: [PATCH] chore: update CSRF_TRUSTED_ORIGINS for Django 4.2 Signed-off-by: Max Sokolski --- tutormfe/patches/openedx-cms-development-settings | 2 +- tutormfe/patches/openedx-cms-production-settings | 2 +- tutormfe/patches/openedx-lms-development-settings | 2 +- tutormfe/patches/openedx-lms-production-settings | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tutormfe/patches/openedx-cms-development-settings b/tutormfe/patches/openedx-cms-development-settings index d38cc94d..1ec9474b 100644 --- a/tutormfe/patches/openedx-cms-development-settings +++ b/tutormfe/patches/openedx-cms-development-settings @@ -4,6 +4,6 @@ COURSE_AUTHORING_MICROFRONTEND_URL = "http://{{ MFE_HOST }}:{{ app["port"] }}/course-authoring" CORS_ORIGIN_WHITELIST.append("http://{{ MFE_HOST }}:{{ app["port"] }}") LOGIN_REDIRECT_WHITELIST.append("{{ MFE_HOST }}:{{ app["port"] }}") -CSRF_TRUSTED_ORIGINS.append("{{ MFE_HOST }}:{{ app["port"] }}") +CSRF_TRUSTED_ORIGINS.append("http://{{ MFE_HOST }}:{{ app["port"] }}") {% endif %} {% endfor %} diff --git a/tutormfe/patches/openedx-cms-production-settings b/tutormfe/patches/openedx-cms-production-settings index 4455ca45..0b6931d2 100644 --- a/tutormfe/patches/openedx-cms-production-settings +++ b/tutormfe/patches/openedx-cms-production-settings @@ -7,4 +7,4 @@ COURSE_AUTHORING_MICROFRONTEND_URL = "{% if ENABLE_HTTPS %}https://{% else %}htt LOGIN_REDIRECT_WHITELIST.append("{{ MFE_HOST }}") CORS_ORIGIN_WHITELIST.append("{% if ENABLE_HTTPS %}https://{% else %}http://{% endif %}{{ MFE_HOST }}") -CSRF_TRUSTED_ORIGINS.append("{{ MFE_HOST }}") +CSRF_TRUSTED_ORIGINS.append("{% if ENABLE_HTTPS %}https://{% else %}http://{% endif %}{{ MFE_HOST }}") diff --git a/tutormfe/patches/openedx-lms-development-settings b/tutormfe/patches/openedx-lms-development-settings index 31cfb4e2..85cdc54a 100644 --- a/tutormfe/patches/openedx-lms-development-settings +++ b/tutormfe/patches/openedx-lms-development-settings @@ -59,7 +59,7 @@ MFE_CONFIG["SCHEDULE_EMAIL_SECTION"] = True # {{ app_name }} MFE CORS_ORIGIN_WHITELIST.append("http://{{ MFE_HOST }}:{{ app["port"] }}") LOGIN_REDIRECT_WHITELIST.append("{{ MFE_HOST }}:{{ app["port"] }}") -CSRF_TRUSTED_ORIGINS.append("{{ MFE_HOST }}:{{ app["port"] }}") +CSRF_TRUSTED_ORIGINS.append("http://{{ MFE_HOST }}:{{ app["port"] }}") {% endfor %} {{ patch("mfe-lms-common-settings") }} diff --git a/tutormfe/patches/openedx-lms-production-settings b/tutormfe/patches/openedx-lms-production-settings index 38870aa7..b81b74cd 100644 --- a/tutormfe/patches/openedx-lms-production-settings +++ b/tutormfe/patches/openedx-lms-production-settings @@ -56,7 +56,7 @@ MFE_CONFIG["SCHEDULE_EMAIL_SECTION"] = True LOGIN_REDIRECT_WHITELIST.append("{{ MFE_HOST }}") CORS_ORIGIN_WHITELIST.append("{% if ENABLE_HTTPS %}https://{% else %}http://{% endif %}{{ MFE_HOST }}") -CSRF_TRUSTED_ORIGINS.append("{{ MFE_HOST }}") +CSRF_TRUSTED_ORIGINS.append("{% if ENABLE_HTTPS %}https://{% else %}http://{% endif %}{{ MFE_HOST }}") {{ patch("mfe-lms-common-settings") }} {{ patch("mfe-lms-production-settings") }}