Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(scorm): use request host for scorm custom domain #141

Merged
merged 1 commit into from
Sep 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions drydock/patches/openedx-common-settings
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,16 @@
def scorm_xblock_storage(xblock):
from django.conf import settings
from storages.backends.s3boto3 import S3Boto3Storage
if SERVICE_VARIANT == "lms":
domain = settings.LMS_BASE
else:
domain = settings.CMS_BASE
from xmodule.util.xmodule_django import get_current_request_hostname

domain = get_current_request_hostname()

if not domain:
if SERVICE_VARIANT == "lms":
domain = settings.LMS_BASE
else:
domain = settings.CMS_BASE

return S3Boto3Storage(
bucket_name=AWS_STORAGE_BUCKET_NAME,
access_key=AWS_ACCESS_KEY_ID,
Expand Down
Loading