X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/967eed676fc83d15b26149047f353ac61faa8217..84511437e601e85bf74f1c8fddf31b95aac54bfe:/src/api/utils.py?ds=sidebyside diff --git a/src/api/utils.py b/src/api/utils.py index a3a1f893a..26e0778d9 100644 --- a/src/api/utils.py +++ b/src/api/utils.py @@ -1,11 +1,11 @@ -# -*- coding: utf-8 -*- -# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later. -# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# This file is part of Wolne Lektury, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Wolne Lektury. See NOTICE for more information. # 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 +import django.views.decorators.cache def oauthlib_request(request): @@ -37,6 +37,7 @@ def oauthlib_response(response_tuple): vary_on_auth = method_decorator(vary_on_headers('Authorization'), 'dispatch') +never_cache = method_decorator(django.views.decorators.cache.never_cache, 'dispatch') class HttpResponseAppRedirect(HttpResponseRedirect):