Class: Tunnels::HttpsProxy
Instance Attribute Summary
Attributes inherited from HttpProxy
#client_port
Instance Method Summary
collapse
Methods inherited from HttpProxy
#initialize, #unbind, #unbind_client
Instance Method Details
#post_init ⇒ Object
90
91
92
|
# File 'lib/tunnels.rb', line 90
def post_init
start_tls
end
|
#receive_data(data) ⇒ Object
99
100
101
102
103
104
105
106
|
# File 'lib/tunnels.rb', line 99
def receive_data(data)
if !@x_forwarded_proto_header_inserted && data =~ /\r\n\r\n/
super data.gsub(/\r\n\r\n/, "\r\nX_FORWARDED_PROTO: https\r\n\r\n")
@x_forwarded_proto_header_inserted = true
else
super
end
end
|
#relay_from_client(data) ⇒ Object
94
95
96
97
|
# File 'lib/tunnels.rb', line 94
def relay_from_client(data)
super
@x_forwarded_proto_header_inserted = false
end
|