forked from External/greenlight
Allow multiple as host_url (#465)
This commit is contained in:
parent
751aecf360
commit
5ff41d0590
|
@ -65,8 +65,12 @@ module SessionsHelper
|
||||||
|
|
||||||
def parse_user_domain(hostname)
|
def parse_user_domain(hostname)
|
||||||
return hostname.split('.').first unless Rails.configuration.url_host
|
return hostname.split('.').first unless Rails.configuration.url_host
|
||||||
return '' unless hostname.include?(Rails.configuration.url_host)
|
Rails.configuration.url_host.split(',').each do |url_host|
|
||||||
hostname.chomp(Rails.configuration.url_host).chomp('.')
|
if hostname.include?(url_host)
|
||||||
|
return hostname.chomp(url_host).chomp('.')
|
||||||
|
end
|
||||||
|
end
|
||||||
|
''
|
||||||
end
|
end
|
||||||
|
|
||||||
def omniauth_options(env)
|
def omniauth_options(env)
|
||||||
|
|
Loading…
Reference in New Issue