diff options
author | Andrew Godwin | 2022-12-10 12:16:08 -0700 |
---|---|---|
committer | Andrew Godwin | 2022-12-10 12:16:08 -0700 |
commit | 3595af7bd239f3843aff3ae06df8932cff23173d (patch) | |
tree | 84b8a0432fb89f253808be11275e2f78fc57bf42 /users/views | |
parent | 9a978786d4eac0139b5606e22c605450adbe7a12 (diff) | |
download | takahe-3595af7bd239f3843aff3ae06df8932cff23173d.tar.gz takahe-3595af7bd239f3843aff3ae06df8932cff23173d.tar.bz2 takahe-3595af7bd239f3843aff3ae06df8932cff23173d.zip |
Media proxy, caching and tuning docs
Fixes #67
Diffstat (limited to 'users/views')
-rw-r--r-- | users/views/identity.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/users/views/identity.py b/users/views/identity.py index 4ca230a..fba640c 100644 --- a/users/views/identity.py +++ b/users/views/identity.py @@ -7,6 +7,7 @@ from django.core import validators from django.http import Http404, JsonResponse from django.shortcuts import redirect from django.utils.decorators import method_decorator +from django.views.decorators.vary import vary_on_headers from django.views.generic import FormView, ListView, TemplateView, View from activities.models import Post, PostInteraction @@ -18,6 +19,7 @@ from users.models import Domain, Follow, FollowStates, Identity, IdentityStates from users.shortcuts import by_handle_or_404 +@method_decorator(vary_on_headers("Accept"), name="dispatch") @method_decorator(cache_page_by_ap_json(public_only=True), name="dispatch") class ViewIdentity(ListView): """ |