rack-reverse-proxy
rack-reverse-proxy copied to clipboard
Is it possible to show contents from the URL with sub directories?
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?