diff options
author | Andrew Godwin | 2022-12-05 20:02:35 -0700 |
---|---|---|
committer | Andrew Godwin | 2022-12-05 20:02:35 -0700 |
commit | 9fe2e6676c32b93023ae301be587a8ab0d93120f (patch) | |
tree | cc1e144ed61785431a98019d6e62f283645bbd40 /users/views | |
parent | e2d28a4be08ccc629def8c85327b657b0bf36f90 (diff) | |
download | takahe-9fe2e6676c32b93023ae301be587a8ab0d93120f.tar.gz takahe-9fe2e6676c32b93023ae301be587a8ab0d93120f.tar.bz2 takahe-9fe2e6676c32b93023ae301be587a8ab0d93120f.zip |
Add a middleware to detect LD Accept headers
Diffstat (limited to 'users/views')
-rw-r--r-- | users/views/identity.py | 7 |
1 files changed, 1 insertions, 6 deletions
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: |