From 9fe2e6676c32b93023ae301be587a8ab0d93120f Mon Sep 17 00:00:00 2001 From: Andrew Godwin Date: Mon, 5 Dec 2022 20:02:35 -0700 Subject: Add a middleware to detect LD Accept headers --- users/views/identity.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'users/views') diff --git a/users/views/identity.py b/users/views/identity.py index 27d2e4e..4996ad7 100644 --- a/users/views/identity.py +++ b/users/views/identity.py @@ -42,12 +42,7 @@ class ViewIdentity(ListView): ): self.identity.transition_perform(IdentityStates.outdated) # If they're coming in looking for JSON, they want the actor - accept = request.headers.get("accept", "text/html").lower() - if ( - "application/json" in accept - or "application/ld" in accept - or "application/activity" in accept - ): + if request.ap_json: # Return actor info return self.serve_actor(self.identity) else: -- cgit v1.2.3