1
0
Fork 0
mirror of https://github.com/omniauth/omniauth.git synced 2022-11-09 12:31:49 -05:00

Rack::Request has an #ssl? method that handles this case. call that rather than reproducing its logic

This commit is contained in:
Daniel Nelson 2012-10-29 13:40:08 -05:00
parent 94772cfbfe
commit d6b17977ec

View file

@ -405,7 +405,7 @@ module OmniAuth
uri.path = '' uri.path = ''
uri.query = nil uri.query = nil
#sometimes the url is actually showing http inside rails because the other layers (like nginx) have handled the ssl termination. #sometimes the url is actually showing http inside rails because the other layers (like nginx) have handled the ssl termination.
uri.scheme = 'https' if(request.env['HTTP_X_FORWARDED_PROTO'] == 'https') uri.scheme = 'https' if request.ssl?
uri.to_s uri.to_s
end end
end end