setting xframe_options to deny
This commit is contained in:
@@ -8,6 +8,7 @@ from django.contrib.auth.decorators import login_required
|
||||
from django.urls import reverse
|
||||
from django.http import Http404, HttpResponseBadRequest
|
||||
from django.utils.translation import ugettext as _
|
||||
from django.views.decorators.clickjacking import xframe_options_exempt
|
||||
from opaque_keys.edx.keys import UsageKey
|
||||
from web_fragments.fragment import Fragment
|
||||
from xblock.django.request import django_to_webob_request, webob_to_django_response
|
||||
@@ -51,6 +52,7 @@ log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@login_required
|
||||
@xframe_options_exempt
|
||||
def preview_handler(request, usage_key_string, handler, suffix=''):
|
||||
"""
|
||||
Dispatch an AJAX action to an xblock
|
||||
|
||||
@@ -531,8 +531,8 @@ MIDDLEWARE_CLASSES = [
|
||||
'openedx.core.djangoapps.site_configuration.middleware.SessionCookieDomainOverrideMiddleware',
|
||||
]
|
||||
|
||||
# Clickjacking protection can be enabled by setting this to 'DENY'
|
||||
X_FRAME_OPTIONS = 'ALLOW'
|
||||
# Clickjacking protection can be disabled by setting this to 'ALLOW'
|
||||
X_FRAME_OPTIONS = 'DENY'
|
||||
|
||||
# Platform for Privacy Preferences header
|
||||
P3P_HEADER = 'CP="Open EdX does not have a P3P policy."'
|
||||
|
||||
Reference in New Issue
Block a user