Permalink
Browse files

use request.ssl? to test for SSL connection when doing authentication…

… of git smart http, leave old tests there just in case
  • Loading branch information...
1 parent 405df17 commit fdca404f9db4436b62043b7de9071f6648dcb485 @ericpaulbishop committed Oct 13, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 app/controllers/git_http_controller.rb
View
2 app/controllers/git_http_controller.rb
@@ -251,7 +251,7 @@ def run_git_prefix
end
def is_ssl?
- return (request.env['HTTPS']).to_s == 'on' || (request.env['HTTP_X_FORWARDED_PROTO']).to_s == 'https' || (request.env['HTTP_X_FORWARDED_SSL']).to_s == 'on'
+ return request.ssl? || (request.env['HTTPS']).to_s == 'on' || (request.env['HTTP_X_FORWARDED_PROTO']).to_s == 'https' || (request.env['HTTP_X_FORWARDED_SSL']).to_s == 'on'
end
# --------------------------------------

0 comments on commit fdca404

Please sign in to comment.