Skip to content

Commit

Permalink
fix(scorm): use request host for scorm custom domain (#142)
Browse files Browse the repository at this point in the history
(cherry picked from commit 1a8cf5b)
  • Loading branch information
Ian2012 authored Sep 24, 2024
1 parent 1cc0abb commit b0a6ffa
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=AWS_STORAGE_BUCKET_NAME,
access_key=AWS_ACCESS_KEY_ID,
Expand Down

0 comments on commit b0a6ffa

Please sign in to comment.