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

hledger-web cannot serve on 0.0.0.0 #2099

Closed
klockeph opened this issue Oct 15, 2023 · 4 comments
Closed

hledger-web cannot serve on 0.0.0.0 #2099

klockeph opened this issue Oct 15, 2023 · 4 comments
Labels
A-BUG Something wrong, confusing or sub-standard in the software, docs, or user experience. web The hledger-web tool.

Comments

@klockeph
Copy link
Contributor

If I run hledger-web --serve --host 0.0.0.0 on my Raspberry Pi to expose web-hledger on all interfaces (in my case WiFi and VPN), some things break:

Most notably, opening 192.168.1.<Pi>:5000 redirects to 0.0.0.0:5000/journal.
Navigating to the journal directly does not help, since it still tries to load additional resources from 0.0.0.0 - the browser console is flooded with Failed to load resource: net::ERR_CONNECTION_REFUSED 0.0.0.0:5000/<resource>.

@klockeph klockeph added the A-BUG Something wrong, confusing or sub-standard in the software, docs, or user experience. label Oct 15, 2023
@simonmichael
Copy link
Owner

Maybe also setting --base-url helps ?

@klockeph
Copy link
Contributor Author

Well yes, but then it would still only work for the particular interface that has the matching IP to the base url.

@klockeph
Copy link
Contributor Author

Coming to think of it, it probably just needs relative paths in the frontend. I'll try to see if I can create a PR.

@simonmichael
Copy link
Owner

"just" you say. :-) Great, thanks for looking at it.

@simonmichael simonmichael added the web The hledger-web tool. label Oct 15, 2023
simonmichael added a commit that referenced this issue Jul 18, 2024
A followup to #2099, #2100 and #2127. Now relative links to js/css
resources will use the same hostname etc. the main page was requested
from, making them work better when accessed via multiple IP
addresses/hostnames without an explicit --base-url setting.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-BUG Something wrong, confusing or sub-standard in the software, docs, or user experience. web The hledger-web tool.
Projects
None yet
Development

No branches or pull requests

2 participants