Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redirects not handled correctly #57

Open
anthonysutardja opened this issue Nov 19, 2015 · 5 comments
Open

Redirects not handled correctly #57

anthonysutardja opened this issue Nov 19, 2015 · 5 comments
Milestone

Comments

@anthonysutardja
Copy link

301 Redirects by the upstream server causes the proxied url to redirect to the upstream path, rather than the proxied path + upstream path.

@anthonysutardja
Copy link
Author

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>/'),
    )

@seocam
Copy link
Contributor

seocam commented Nov 19, 2015

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!

@seocam seocam added this to the 0.9.8 milestone Dec 3, 2015
@seocam
Copy link
Contributor

seocam commented Dec 3, 2015

Hello @anthonysutardja I want to address that before 0.9.8. I little help would be really appreciated! Cheers!

@seocam
Copy link
Contributor

seocam commented Mar 29, 2016

Closed for lack of info.

@seocam seocam closed this as completed Mar 29, 2016
@toinbis
Copy link

toinbis commented Apr 8, 2020

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.

@seocam seocam reopened this Apr 8, 2020
@seocam seocam modified the milestones: 0.9.8, 1.0 Jun 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants