Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

HTTPS support

  • Loading branch information...
commit 1ce9d59d08a805445f9c48f4b9841183178c9a3c 1 parent 57d9b78
Peter Wagenet wagenet authored Charles Jolley committed
Showing with 6 additions and 1 deletion.
  1. +6 −1 lib/sproutcore/rack/proxy.rb
7 lib/sproutcore/rack/proxy.rb
View
@@ -5,7 +5,7 @@
# and contributors
# ===========================================================================
-require 'net/http'
+require 'net/https'
module SC
module Rack
@@ -71,6 +71,11 @@ def handle_proxy(proxy, proxy_url, env)
tries = 0
until done
::Net::HTTP.start(http_host, http_port) do |http|
+ if proxy[:secure]
+ http.use_ssl = true
+ http.verify_mode = OpenSSL::SSL::VERIFY_NONE
+ end
+
if no_body_method.include?(http_method)
response = http.send(http_method, http_path, headers)
else
Please sign in to comment.
Something went wrong with that request. Please try again.