rack-reverse-proxy icon indicating copy to clipboard operation
rack-reverse-proxy copied to clipboard

Is it possible to show contents from the URL with sub directories?

Open goodpic opened this issue 9 years ago • 0 comments

Thank you for this great gem. I would like to show the contents from a URL with subdirectory at the http://example.com/ (Rails app). I configured config/application.rb as following, but this does not work.

module MyRailsApp
  class Application < Rails::Application
    config.middleware.use Rack::ReverseProxy do
      reverse_proxy_options preserve_host: true
      reverse_proxy /^\/$/, 'http://example-2.com/example-page'
    end
  end
end

But this configuration only shows "http://example-2.com/" not "http://example-2.com/example-page”. Is this usage supported?

goodpic avatar Aug 28 '15 02:08 goodpic