# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
#
-from django.http import HttpResponse
+from django.http import HttpResponse, HttpResponseRedirect
+from django.utils.decorators import method_decorator
from django.utils.encoding import iri_to_uri
+from django.views.decorators.vary import vary_on_headers
def oauthlib_request(request):
v = iri_to_uri(v)
response[k] = v
return response
+
+
+vary_on_auth = method_decorator(vary_on_headers('Authorization'), 'dispatch')
+
+
+class HttpResponseAppRedirect(HttpResponseRedirect):
+ allowed_schemes = HttpResponseRedirect.allowed_schemes + ['wolnelekturyapp']