rack-reverse-proxy
rack-reverse-proxy copied to clipboard
The proxy is redirecting to the root domain of the forwarded address.
I have a domain "https://www.example.com".
I've setup my config.ru to do the simple forward shown in the wiki
reverse_proxy /^\/blog(\/*.*)$/, 'http://myblog.tumblr.com$1'
However, when I try to visit "https://www.example.com/blog", it redirects to "https://www.tumblr.com". Is this expected?
Check the Location header in the redirect you are receiving. rack-reverse-proxy does not rewrite those, and if a full URL is in the Location header (and not a path), you'll get this issue.
I'm facing this issue. My Location header is a full URL. How can I make my app response only the path for this redirect?
I am also facing this issue. What shall i do to avoid this issue.
Thanks for help in advance
For anyone having same issue, as I do: use reverse_proxy_options replace_response_host: true, along with other options.