fix error
This commit is contained in:
parent
b5a297e875
commit
42c8b4f45f
|
@ -86,24 +86,18 @@ class Roda
|
|||
.join('-')
|
||||
end
|
||||
.merge({
|
||||
'Host' => "localhost",
|
||||
'Via' => _via_header_string
|
||||
'Host' => "127.0.0.1"
|
||||
})
|
||||
end
|
||||
|
||||
def _respond(proxied_response)
|
||||
response.status = proxied_response.status
|
||||
response.status = proxied_response.code.to_i
|
||||
proxied_response
|
||||
.headers
|
||||
.each_header.to_h
|
||||
.reject { |k, v| k.downcase == 'transfer-encoding' }
|
||||
.each { |k, v| response[k] = v }
|
||||
response['Via'] = _via_header_string
|
||||
response.write(proxied_response.body)
|
||||
end
|
||||
|
||||
def _via_header_string
|
||||
"#{env['SERVER_PROTOCOL']} #{env['SERVER_NAME']}:#{env['SERVER_PORT']}"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue