From 68d59b399e7c0e918d0ff9dcfdb17076049513f8 Mon Sep 17 00:00:00 2001 From: Tyler Kennedy Date: Sun, 27 Nov 2022 16:43:46 -0500 Subject: Set content type when serving object Fixes #37 --- users/views/identity.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'users') 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 ( -- cgit v1.2.3