Allow alternate domains for mastodon handlers (#3187)
This commit is contained in:
		@@ -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)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user