update cors and readme

This commit is contained in:
FahadKhalid210 2024-04-18 17:14:33 +05:00
parent 372e04309a
commit b0a96c50b8
2 changed files with 16 additions and 4 deletions

View File

@ -240,6 +240,13 @@ Postgresql/Superset settings
- ``CAIRN_POSTGRESQL_PASSWORD`` (default: ``"{{ 20|random_string }}"``): Postgresql password.
- ``CAIRN_SUPERSET_SECRET_KEY`` (default: ``"{{ 20|random_string }}"``): randomly-generated secret key for the Superset frontend.
Add/Update Superset Configurations
----------------------------------
Use ``cairn-superset-settings`` patch to add or update `Superset configurations <https://github.com/apache/superset/blob/master/superset/config.py>`__.
Then apply changes with::
tutor local launch
Troubleshooting
---------------

View File

@ -163,12 +163,17 @@ FEATURE_FLAGS = {
}
# Embedded Dashboard CORS
OPENEDX_CMS_ROOT_URL = "{% if ENABLE_HTTPS %}https{% else %}http{% endif %}://{{ CMS_HOST }}"
if os.environ.get("FLASK_ENV") == "development":
OPENEDX_CMS_ROOT_URL = "http://{{ CMS_HOST }}:8001"
ENABLE_CORS=True
CORS_OPTIONS={
"supports_credentials": True,
"allow_headers": ["*"],
"resources": ["*"],
'origins': ["{{ LMS_HOST }}","{{ CMS_HOST }}"],
"origins": [
f"{OPENEDX_LMS_ROOT_URL}",
f"{OPENEDX_CMS_ROOT_URL}"
],
}
{{ patch("cairn-superset-settings") }}