Last active
December 21, 2015 16:29
-
-
Save nonZero/6334336 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Iframe(object): | |
def __init__(self, prm): | |
self.param = prm | |
def __call__(self, view): | |
def df(*args, **kwargs): | |
for i in args: | |
if type(i) == WSGIRequest: | |
host = i.META['HTTP_REFERER'] | |
print host | |
return xframe_options_exempt(self.view)(*args, **kwargs) | |
return df |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment