Add fallback redirection when getting a webfinger query LOCAL_DOMAIN@LOCAL_DOMAIN (#23600)

Co-authored-by: Eugen Rochko <eugen@zeonfederated.com>
This commit is contained in:
Claire
2023-05-02 17:42:42 +02:00
parent 210ff36860
commit 2779bce9a2
2 changed files with 47 additions and 12 deletions

View File

@@ -18,7 +18,14 @@ module WellKnown
private
def set_account
@account = Account.find_local!(username_from_resource)
username = username_from_resource
@account = begin
if username == Rails.configuration.x.local_domain
Account.representative
else
Account.find_local!(username)
end
end
end
def username_from_resource