Under review

"Bypass single root folder" option breaks page when using reverse proxy with SSL

Alpe 2 years ago updated 1 year ago 8

Page is served on https via reverse proxy. With this option set, the following happen:
- Open page with only one folder

- Receive a 302 html code redirecting the page (as expected), but to http instead of https.

Under review

Mmmm, should not work that way, I'll investigate.

I confirm this is happening to me too. https nginx in front of ubooquity on http, redirtects to http when this option is enabled

Posting just to remind dev of this, since you seem to be working on the update lately.
Currently I'm using javascript for this, with comixology2 theme adding this to themeScript.js inside loadScript(proxyPrefix+"/theme/js/jquery-3.3.1.min.js", function(){ at the end.

Consider me reminded. ;)

I checked my code: I don't specify the protocol when performing the redirection.

Could it be an nginx issue ? Google seems to return quite a few results when asked about redirection (http 302), nginx and https.

Thanks for looking into this.

I use lighttpd.
Probably the server automatically generates 302 to http because as it sees it's running over it.
Maybe instead of not specifying it there should be a filter that chooses the correct protocol. If not possible, maybe an option so we can configure it manually (mayble an off/http/https selection for this option) or doing it via JavaScript.

When I test this scenario (HTTPS + reverse proxy option + bypass single folder), I get redirected to a HTTPS address, not a HTTP one.

The test I did was without a proxy server in front of Ubooquity though: local instance, local browser.

Are you sure the issue is not with the proxy itself ?

I don't know what I could change in Ubooquity code to improve the situation.

Retested it with multiple browsers (to be sure) and the issue persist. :/
Also tried using oficial Oracle Java 8 instead of a newer modification I was running on. Nothing.
That other guy had the same problem with a different setup, using nginx (instead of lighttpd, like me), so I don't know if there's something I can do from here to fix this.
I'm using that javascript trick I posted as a workaround, so it doesn't affect me that much.