summaryrefslogtreecommitdiffstats
path: root/users
diff options
context:
space:
mode:
Diffstat (limited to 'users')
-rw-r--r--users/models/identity.py4
-rw-r--r--users/views/identity.py2
2 files changed, 4 insertions, 2 deletions
diff --git a/users/models/identity.py b/users/models/identity.py
index c674bf4..21ac0fd 100644
--- a/users/models/identity.py
+++ b/users/models/identity.py
@@ -153,7 +153,7 @@ class Identity(StatorModel):
if self.icon:
return self.icon.url
elif self.icon_uri:
- return self.icon_uri
+ return f"/proxy/identity_icon/{self.pk}/"
else:
return static("img/unknown-icon-128.png")
@@ -164,7 +164,7 @@ class Identity(StatorModel):
if self.image:
return self.image.url
elif self.image_uri:
- return self.image_uri
+ return f"/proxy/identity_image/{self.pk}/"
@property
def safe_summary(self):
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):
"""