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
1.32: hledger-web --base-url has no effect #2127
Comments
When I run hledger-web with the --socket option it still listens on port 5000 instead of the socket. |
@rajeevn1 I can't reproduce here on a mac; are you on GNU/linux ?
|
Yes I am on debian stable |
Hmm, ubuntu should be similar but I still can't reproduce there:
|
|
I am trying to run it behind apache reverse proxy, which works for 1.31 but not for 1.32. ProxyPass /hledger/ unix://hledger.sock|http://127.0.0.1:5000/ I will check if I can find more info. |
Could you also test with curl, just to simplify ? See if you can produce a transcript like mine above, with 1.31 and 1.32.1. |
I tried that already, curl works. |
For clarity, could you show transcripts ? When you have time. I don't know what works means. |
|
I was hoping for full transcripts like mine, but never mind. Make sure you don't have an old instance still running on port 5000. |
Ah.. @rajeevn1 your command above is using the socket file and working as expected. Please show curl without --unix-socket also. |
As in #2127 (comment) |
I think the problem with 1.32 is that it is not handling --base-url=BASEURL correctly, and still redirecting to http://127.0.0.1:5000. I will check more when I have some time. |
While testing I did notice that hyperlinks didn't seem to be respecting --base-url. And you're right, that seems to be what has broken in 1.32. Thanks ! |
I guess use guessApprootOr only when --base-url option is not used ? |
Oh nooo.... Sorry for that! I'm indeed not using this option. I think what I described in #2100 (comment) could be a viable alternative. Edit: you were faster than me. yes using guessAppRoot only when --base-url option is not used is probably the way to go :) |
Unfortunately it seems to be a compile-time configuration: https://hackage.haskell.org/package/yesod-core-1.6.25.1/docs/Yesod-Core.html#v:approot |
ooof. In that case, should we rather find out why |
My test was like:
Good:
Bad (with guessAppRootOr):
I didn't think that guessApproot could be expected to guess right in all cases, maybe it could but doesn't here. I tried hard but haven't been able to implement both cases today, which means I must revert #2100 unfortunately. |
This is fixed in master, and a bugfix release will follow at some point. @rajeevn1 thanks for the report, claim your https://hledger.org/REGRESSIONS.html#regression-bounty when convenient. |
submitted invoice for regression bounty, thanks!! |
the option works in 1.31
The text was updated successfully, but these errors were encountered: