-
-
Notifications
You must be signed in to change notification settings - Fork 118
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
Need to handle base URL #39
Comments
@Timokasse we, as all reverse proxies I know don't actually change the the path of other secondary requests. In fact each request is a new request. So, if you request in your browser the page
So, basically you app has to be minimally prepared to work with proxies. |
@Timokasse if you have any doubts please or disagree with my answer please reopen. Cheers |
Hello,
Let's say you want to have
http://myproxy/toto.html
redirect tohttp://proxied/toto.html
. Then a simpleurl(r'^(?P<path>.*)$', ProxyView.as_view(upstream='http://proxied/'))
will do the trick. And the static files in the page will also work properly. It will, for example refer tohttp://myproxy/css/default.css
properly.Now you may want to have a base URL because this proxy will work for more than one site, for example. You would want something like this:
But it doesn't work because all static files will forget about the base url
app1
orapp2
. So the pagehttp://myproxy/app1/toto.html
will refer tohttp://myproxy/css/default.css
instead ofhttp://myproxy/app1/css/default.css
.Please add the possibility to handle this in
revproxy
.Thanks,
Timok
The text was updated successfully, but these errors were encountered: