Revert "Added decorator for X-Frame header"

This reverts commit 8a838aa4bd.
This commit is contained in:
David Taylor
2016-10-08 17:19:35 +01:00
parent 511ce554b1
commit 73b8ce4add
2 changed files with 3 additions and 14 deletions

View File

@@ -4,17 +4,6 @@ from django.template import RequestContext
from django.http import HttpResponseRedirect
from django.core.urlresolvers import reverse
def allow_embed():
# using django.views.decorators.clickjacking.xframe_options_exempt removes the header
# Safari has differnet defaults to other browsers, so we have to set it explicitly
def headers_wrapper(fun):
def wrapped_function(*args, **kwargs):
response = fun(*args, **kwargs)
response['X-Frame-Options'] = "ALLOW"
return response
return wrapped_function
return headers_wrapper
def user_passes_test_with_403(test_func, login_url=None, oembed_view=None):
"""
Decorator for views that checks that the user passes the given test.