class Rack::Reproxy::Lighttpd
Lighttpd
uses X-Rewrite-URI and X-Rewrite-Host response headers. Be sure to set proxy-core.allow-x-rewrite in your lighty config.
Private Instance Methods
reproxy(env, status, headers, body)
click to toggle source
Calls superclass method
Rack::Reproxy::Middleware#reproxy
# File lib/rack/reproxy.rb, line 136 def reproxy(env, status, headers, body) super.tap do |response| uri = URI(headers[@header]) response[1]['X-Rewrite-Host'] = uri.hostname response[1]['X-Rewrite-URI'] = uri.request_uri end end