Closed bogdanRada closed 8 years ago
i think is happening probably because the initialize method should receive first argument the application and then the options hash.
if i redefine the initialize method from Rack::Proxy like this:
class RackPhpProxy < Rack::Proxy
def initialize(app = nil, opts= {})
@app = app
super(opts)
end
def rewrite_env(env)
request = Rack::Request.new(env)
if request.path =~ %r{\.php}
env["HTTP_HOST"] = "localhost"
env["REQUEST_PATH"] = "/php/#{request.fullpath}"
end
env
end
end
The issue dissapears , but instead the connection fails to localhost with timeout, but that probably is just my configuration wrong or something.
I think should be fixed in the gem itself.
any update on this?
is this repository still maintained?
i am closing this as it seem the repository is not maintained anymore :( too bad, i really wanted to use this in one of my projects.
Hi Bogdan,
Somehow I stopped getting email updates for this repo. Feel free to send a PR, I'll be happy to merge it.
thanks for responding. I have added pull request #55 . :)
It seems this gem is incompatible with Newrelic gem Here is some backtrace:
Any ideas how to make it work?
I used this proxy class: