Skip to content

Commit

Permalink
fix(scorm): use request host for scorm custom domain (#141)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ian2012 authored Sep 24, 2024
1 parent 8c1417c commit 55a5153
Showing 1 changed file with 10 additions and 4 deletions.
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

0 comments on commit 55a5153

Please sign in to comment.