mirror of
https://github.com/omniauth/omniauth.git
synced 2022-11-09 12:31:49 -05:00
Handle HTTP_X_FORWARDED_PROTO header for https
This commit is contained in:
parent
7840608a02
commit
1e1e09304d
1 changed files with 2 additions and 0 deletions
|
@ -376,6 +376,8 @@ module OmniAuth
|
|||
uri = URI.parse(request.url.gsub(/\?.*$/,''))
|
||||
uri.path = ''
|
||||
uri.query = nil
|
||||
#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.to_s
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue