Add middleware classes dynamically from configuration and switch MIDDLEWARE_CLASSES to use a list

This commit is contained in:
Jesse Shapiro
2017-09-26 16:16:00 -04:00
parent db6570b754
commit c4767e253b
14 changed files with 41 additions and 22 deletions

View File

@@ -395,7 +395,7 @@ simplefilter('ignore')
################################# Middleware ###################################
MIDDLEWARE_CLASSES = (
MIDDLEWARE_CLASSES = [
'crum.CurrentRequestUserMiddleware',
'request_cache.middleware.RequestCache',
@@ -453,7 +453,7 @@ MIDDLEWARE_CLASSES = (
# This must be last so that it runs first in the process_response chain
'openedx.core.djangoapps.site_configuration.middleware.SessionCookieDomainOverrideMiddleware',
)
]
# Clickjacking protection can be enabled by setting this to 'DENY'
X_FRAME_OPTIONS = 'ALLOW'