diff options
author | Tyler Kennedy | 2022-11-27 16:43:46 -0500 |
---|---|---|
committer | GitHub | 2022-11-27 14:43:46 -0700 |
commit | 68d59b399e7c0e918d0ff9dcfdb17076049513f8 (patch) | |
tree | 84f5a547f9a9c3ee623bb875ca6f97f2e128831c /activities/views | |
parent | 842b45839535594b248205f4905bb4ec837050b1 (diff) | |
download | takahe-68d59b399e7c0e918d0ff9dcfdb17076049513f8.tar.gz takahe-68d59b399e7c0e918d0ff9dcfdb17076049513f8.tar.bz2 takahe-68d59b399e7c0e918d0ff9dcfdb17076049513f8.zip |
Set content type when serving object
Fixes #37
Diffstat (limited to 'activities/views')
-rw-r--r-- | activities/views/posts.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/activities/views/posts.py b/activities/views/posts.py index b9bdc7f..e394c4e 100644 --- a/activities/views/posts.py +++ b/activities/views/posts.py @@ -75,7 +75,10 @@ class Individual(TemplateView): # If this not a local post, redirect to its canonical URI if not self.post_obj.local: return redirect(self.post_obj.object_uri) - return JsonResponse(canonicalise(self.post_obj.to_ap(), include_security=True)) + return JsonResponse( + canonicalise(self.post_obj.to_ap(), include_security=True), + content_type="application/activity+json", + ) @method_decorator(identity_required, name="dispatch") |