Class: Tunnels::HttpsProxy
Instance Method Summary
collapse
Methods inherited from HttpProxy
#initialize, #send, #unbind, #unbind_client
Instance Method Details
#post_init ⇒ Object
230
231
232
|
# File 'lib/tunnels.rb', line 230
def post_init
start_tls
end
|
#receive_data(data) ⇒ Object
239
240
241
242
243
244
245
246
|
# File 'lib/tunnels.rb', line 239
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
234
235
236
237
|
# File 'lib/tunnels.rb', line 234
def relay_from_client(data)
super
@x_forwarded_proto_header_inserted = false
end
|