Skip to content
Snippets Groups Projects
Unverified Commit 0187b1b8 authored by Andrew Shultz's avatar Andrew Shultz Committed by GitHub
Browse files

Merge pull request #296 from openedx/ashultz0/lms-altbase

feat: add override for the LMS_BASE_URL in various LTI settings
parents af8bcdbf 415156c1
No related branches found
No related tags found
No related merge requests found
...@@ -24,13 +24,20 @@ def _(text): ...@@ -24,13 +24,20 @@ def _(text):
def get_lms_base(): def get_lms_base():
""" """
Returns LMS base url to be used as issuer on OAuth2 flows Returns LMS base url to be used as issuer on OAuth2 flows
and in various LTI URLs. For local testing it is often necessary
to override the normal LMS base with a proxy such as ngrok, use
the setting LTI_LMS_BASE_URL_OVERRIDE in your LMS settings if
necessary.
TODO: This needs to be improved and account for Open edX sites and TODO: This needs to be improved and account for Open edX sites and
organizations. organizations.
One possible improvement is to use `contentstore.get_lms_link_for_item` One possible improvement is to use `contentstore.get_lms_link_for_item`
and strip the base domain name. and strip the base domain name.
""" """
return settings.LMS_ROOT_URL if hasattr(settings, 'LTI_LMS_BASE_URL_OVERRIDE'):
return settings.LTI_LMS_BASE_URL_OVERRIDE
else:
return settings.LMS_ROOT_URL
def get_lms_lti_keyset_link(config_id): def get_lms_lti_keyset_link(config_id):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment