Allow alternate domains for mastodon handlers (#3187)
This commit is contained in:
parent
9d04de1c8d
commit
a94c152fd3
4 changed files with 41 additions and 1 deletions
|
@ -23,7 +23,14 @@ module WellKnown
|
|||
private
|
||||
|
||||
def username_from_resource
|
||||
WebfingerResource.new(resource_param).username
|
||||
resource_user = resource_param
|
||||
|
||||
username, domain = resource_user.split('@')
|
||||
if Rails.configuration.x.alternate_domains.include?(domain)
|
||||
resource_user = "#{username}@#{Rails.configuration.x.local_domain}"
|
||||
end
|
||||
|
||||
WebfingerResource.new(resource_user).username
|
||||
end
|
||||
|
||||
def pem_to_magic_key(public_key)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue