Created
November 16, 2015 23:34
-
-
Save pbassut/c0906f95f6d0720be4d8 to your computer and use it in GitHub Desktop.
middleware for reverse_proxy https://gist.github.com/JustinTArthur/5710254
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 EscapeFragmentMiddleware(): | |
def process_view(self, request, view_func, view_args, view_kwargs): | |
if request.GET.get('_escaped_fragment_', None): | |
return reverse_proxy(request) | |
return view_func(request, *view_args, **view_kwargs) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment