You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running Textual-Serve bound to 0.0.0.0, the landing‐page template inlines all static asset URLs (CSS/JS/images) using the configured host or public_url. If you pass host="0.0.0.0" (or forget to set public_url), every request for /static/... goes to http://0.0.0.0:8000/static/..., which is not routable, and assets fail to load.
Description
When running Textual-Serve bound to
0.0.0.0
, the landing‐page template inlines all static asset URLs (CSS/JS/images) using the configuredhost
orpublic_url
. If you passhost="0.0.0.0"
(or forget to setpublic_url
), every request for/static/...
goes tohttp://0.0.0.0:8000/static/...
, which is not routable, and assets fail to load.Steps to Reproduce
textual-serve==1.1.2
in a project.main.py
containing:http://<your-machine-IP>:8000/
.xterm.css
,textual.js
, etc. are targetinghttp://0.0.0.0:8000/static/...
and failing.Actual Behavior
0.0.0.0:8000
, which refuses connections.Expected Behavior
Assets should either:
/static/js/textual.js
) so they load from the same origin the browser requested, orHost
header whenpublic_url
is unset, rather than the bind address.Environment
1.1.2
3.10.11
Proposed Solution
Update the Jinja template (
app_index.html
) so that static assets use relative paths by default:Alternatively, detect when
public_url
is the generic bind address (0.0.0.0
or::
) and fall back toHost
header–based URL generation.The text was updated successfully, but these errors were encountered: