diff options
Diffstat (limited to 'app/controllers/well_known')
-rw-r--r-- | app/controllers/well_known/webfinger_controller.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/app/controllers/well_known/webfinger_controller.rb b/app/controllers/well_known/webfinger_controller.rb index 4a521d102..84f3015e8 100644 --- a/app/controllers/well_known/webfinger_controller.rb +++ b/app/controllers/well_known/webfinger_controller.rb @@ -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) |