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
|
@ -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 New Issue