summaryrefslogtreecommitdiffstats
path: root/users/views
diff options
context:
space:
mode:
authorTyler Kennedy2022-11-27 16:43:46 -0500
committerGitHub2022-11-27 14:43:46 -0700
commit68d59b399e7c0e918d0ff9dcfdb17076049513f8 (patch)
tree84f5a547f9a9c3ee623bb875ca6f97f2e128831c /users/views
parent842b45839535594b248205f4905bb4ec837050b1 (diff)
downloadtakahe-68d59b399e7c0e918d0ff9dcfdb17076049513f8.tar.gz
takahe-68d59b399e7c0e918d0ff9dcfdb17076049513f8.tar.bz2
takahe-68d59b399e7c0e918d0ff9dcfdb17076049513f8.zip
Set content type when serving object
Fixes #37
Diffstat (limited to 'users/views')
-rw-r--r--users/views/identity.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/users/views/identity.py b/users/views/identity.py
index 22b42f4..1f75a0a 100644
--- a/users/views/identity.py
+++ b/users/views/identity.py
@@ -55,7 +55,10 @@ class ViewIdentity(ListView):
# If this not a local actor, redirect to their canonical URI
if not identity.local:
return redirect(identity.actor_uri)
- return JsonResponse(canonicalise(identity.to_ap(), include_security=True))
+ return JsonResponse(
+ canonicalise(identity.to_ap(), include_security=True),
+ content_type="application/activity+json",
+ )
def get_queryset(self):
return (