Skip to content
Browse files

Merge pull request #647 from populr/master

Rely on Rack::Request#ssl? rather than reproducing its logic
  • Loading branch information...
2 parents 94772cf + d6b1797 commit d420e039f86e7f8afcec862b8282efb3dff8d4de @sferik sferik committed Oct 29, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/omniauth/strategy.rb
View
2 lib/omniauth/strategy.rb
@@ -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

0 comments on commit d420e03

Please sign in to comment.
Something went wrong with that request. Please try again.