Skip to content

Commit

Permalink
Merge pull request #647 from populr/master
Browse files Browse the repository at this point in the history
Rely on Rack::Request#ssl? rather than reproducing its logic
  • Loading branch information
sferik committed Oct 29, 2012
2 parents 94772cf + d6b1797 commit d420e03
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/omniauth/strategy.rb
Expand Up @@ -405,7 +405,7 @@ def full_host
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.scheme = 'https' if request.ssl?
uri.to_s
end
end
Expand Down

0 comments on commit d420e03

Please sign in to comment.