Skip to content
Closed
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
4 changes: 2 additions & 2 deletions common/djangoapps/third_party_auth/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@
def xframe_allow_whitelisted(view_func):
"""
Modifies a view function so that its response has the X-Frame-Options HTTP header
set to `settings.X_FRAME_OPTIONS` if the request HTTP referrer is not from a whitelisted hostname.
set to 'DENY' if the request HTTP referrer is not from a whitelisted hostname.
"""

def wrapped_view(request, *args, **kwargs):
""" Modify the response with the correct X-Frame-Options. """
resp = view_func(request, *args, **kwargs)
x_frame_option = settings.X_FRAME_OPTIONS
x_frame_option = 'DENY'
if settings.FEATURES['ENABLE_THIRD_PARTY_AUTH']:
referer = request.META.get('HTTP_REFERER')
if referer is not None:
Expand Down