django-revproxy
django-revproxy copied to clipboard
Redirects not handled correctly
301 Redirects by the upstream server causes the proxied url to redirect to the upstream path, rather than the proxied path + upstream path.
My upstream server automatically requires most URLS to end with a trailing slash /api/jellos/
(as opposed to /api/jellos
and issues a 301
My temporary fix is to use the built in regex rewrites that are built-in with this package:
from revproxy.views import ProxyView
class JelloProxyView(ProxyView):
upstream = 'http://jello:8080'
rewrite = (
(r'^(?P<base>.*)(?<!/)$', r'\g<base>/'),
)
Thanks for the report @anthonysutardja! I'm a bit busy lately so if you could write a test to reproduce your problem it would be very helpful. Let me know if you need some guidance. Thanks again!
Hello @anthonysutardja I want to address that before 0.9.8. I little help would be really appreciated! Cheers!
Closed for lack of info.
Same bug here :( Instead of page being loaded I get 301 redirect to an upstream url. Try with domain https://15min.lt as an upstream.