Permalink
Browse files

Rack::Request has an #ssl? method that handles this case. call that r…

…ather than reproducing its logic
  • Loading branch information...
1 parent 94772cf commit d6b17977eca1004a5b0f732c3af19a141ee58160 Daniel Nelson 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 d6b1797

Please sign in to comment.