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:
parent
94772cfbfe
commit
d6b17977ec
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue