Skip to content
Merged
Show file tree
Hide file tree
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
6 changes: 6 additions & 0 deletions lms/envs/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -4872,6 +4872,12 @@ def _make_locale_paths(settings): # pylint: disable=missing-function-docstring
ENABLE_AUTHN_LOGIN_BLOCK_HIBP_POLICY = False
HIBP_LOGIN_BLOCK_PASSWORD_FREQUENCY_THRESHOLD = 5

# .. setting_name: MFE_CONFIG_API_CACHE_TIMEOUT
# .. setting_default: 60*5
# .. setting_description: The MFE_CONFIG site configuration will be cached during the
# specified time
MFE_CONFIG_API_CACHE_TIMEOUT = 60*5

############### Settings for the ace_common plugin #################
ACE_ENABLED_CHANNELS = ['django_email']
ACE_ENABLED_POLICIES = ['bulk_email_optout']
Expand Down
5 changes: 5 additions & 0 deletions openedx/core/djangoapps/mfe_api/views.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
from django.conf import settings
from django.utils.decorators import method_decorator
from django.views.decorators.cache import cache_page

from rest_framework.response import Response
from rest_framework.views import APIView

Expand All @@ -9,6 +13,7 @@ class MFEConfigView(APIView):
Provides an API endpoint for MFE config from site configurations.
"""

@method_decorator(cache_page(settings.MFE_CONFIG_API_CACHE_TIMEOUT))
def get(self, request):
"""
GET /api/mfe/v1/config
Expand Down