Page 1 of 1
http://localhost:8080/blabla rewrites to https URL
Posted: October 6th, 2012, 2:12 pm
by sander
SAB (0.7.4) is running, and accessible via
http://localhost:8080/
However, when I extend the URL with some nonsense, like
http://localhost:8080/blabla , it rewrites to
https://r540.local:8080/sabnzbd (which does not work on my system as HTTPS is not working).
I would expect a plain error message from HTTP ("page does not exist"), or a redirect to the root of SABnzbd.
Is this a feature, or a bug?
FWIW: it is annoying because I'm trying to get a revers proxy working.
Re: http://localhost:8080/blabla rewrites to https URL
Posted: October 7th, 2012, 3:59 am
by shypike
Redirecting HTTP to HTTPS is a nightmare with CherryPy.
There's simply no way to get at the address that's being used by the calling party to reach SABnzbd.
The kludge I use, is to redirect to the "launch browser" URL.
Re: http://localhost:8080/blabla rewrites to https URL
Posted: October 7th, 2012, 4:20 am
by sander
shypike wrote:
The kludge I use, is to redirect to the "launch browser" URL.
... the HTTPS is the Launch Browser URL? I would prefer the http version (and not the R540 local stuff in it). Is there something I should set?
Re: http://localhost:8080/blabla rewrites to https URL
Posted: October 7th, 2012, 4:41 am
by shypike
Forget my earlier answer, I assumed you were talking about HTTP-->HTTPS redirection,
when HTTP is disabled. Although the "launch URL" remark is true.
Whenever HTTPS is enabled, an invalid URL will redirect to the default URL, which is HTTPS.
If you don't want that, don't enable HTTPS.
As for reverse proxy, the proxy should only pass /sabnzbd to SABnzbd and not /blabla.
Isn't that what a reverse proxy is about, combine more than one server on a single port?
BTW: redirection with CherryPy is a struggle, because what it should pass to SABnzbd
is the original URL that was used to address SABnzbd. Unfortunately, a full evening
of tracing through CherryPy did not deliver the goods.
Re: http://localhost:8080/blabla rewrites to https URL
Posted: October 7th, 2012, 2:33 pm
by sander
Yeah, I know how a reverse proxy *should* work ... but I discovered this bug/feature in SAB while trying to set up a reverse proxy. This discovery was just a side effect the incorrect proxy setup.
FWIW: the reverse proxy is now working.