Allow multiple as host_url (#465)

This commit is contained in:
Jesus Federico 2019-04-16 09:28:30 -04:00 committed by GitHub
parent 751aecf360
commit 5ff41d0590
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 2 deletions

View File

@ -65,8 +65,12 @@ module SessionsHelper
def parse_user_domain(hostname)
return hostname.split('.').first unless Rails.configuration.url_host
return '' unless hostname.include?(Rails.configuration.url_host)
hostname.chomp(Rails.configuration.url_host).chomp('.')
Rails.configuration.url_host.split(',').each do |url_host|
if hostname.include?(url_host)
return hostname.chomp(url_host).chomp('.')
end
end
''
end
def omniauth_options(env)