I launched the gollum&omnigollum&omniauth-ldap via unicorn way: unicorn -c unicorn.rb -E production. Test the login failure scenario.
And found omniauth.origin is nil:
app.before options[:route_prefix] + '/auth/failure' do
user_deauth
@title = 'Authentication failed'
@subtext = "Provider did not validate your credentials (#{params[:message]}) - please retry or choose another login service"
@auth_params = "?origin=#{CGI.escape(request.env['omniauth.origin'])}" unless request.env['omniauth.origin'].nil?
if request.env['omniauth.origin'].nil?
puts 'Noop, why omniauth.origin is nil??'
end
puts "auth failure #{@auth_params}"
show_error
end
Which led loginurl be set incorrect.
However, the omniauth.origin was set right in front web page if rack was in development environment.
I launched the
gollum&omnigollum&omniauth-ldap
via unicorn way:unicorn -c unicorn.rb -E production
. Test the login failure scenario.And found omniauth.origin is nil:
Which led
loginurl
be set incorrect.However, the
omniauth.origin
was set right in front web page if rack was in development environment.How to handle this problem? thanks.