Rack Middleware to proxy requests to a remote server. This is usefull for proxying AJAX request to remote services.
Forked from: https://gist.github.com/cwninja/207884
Thanks to @cwninja.
Add this line to your application's Gemfile:
gem 'rack-forward'
And then execute:
$ bundle
Or install it yourself as:
$ gem install rack-forward
use Rack::Forward do |req|
if req.path =~ %r{^/remote/service.php$}
URI.parse("http://remote-service-provider.com/service-end-point.php?#{req.query_string}")
end
end
run proc { |env| [200, {"Content-Type" => "text/plain"}, ["Ha ha ha"]] }
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)