Landing page /hero_cockpit/web/ uses root-relative links — break when served behind a path-prefix gateway #7

Closed
opened 2026-05-25 16:17:47 +00:00 by mik-tf · 1 comment
Owner

The cockpit landing page at /hero_cockpit/web/ renders:

Try /services.
See /.well-known/heroservice.json and /health.

These are root-relative paths. When the cockpit is served behind a path-prefix gateway (TFGrid Web Gateway, hero_router, reverse proxies in general), the gateway adds the prefix /hero_cockpit/web/ to all served pages. Root-relative links bypass that prefix and 404.

Live repro at s158 admin VM: https://hcockpit.gent01.qa.grid.tf/hero_cockpit/web/ shows the landing page; clicking the /services link goes to https://hcockpit.gent01.qa.grid.tf/services which is 404. The real services dashboard lives at https://hcockpit.gent01.qa.grid.tf/hero_cockpit/web/services (HTTP 200, 188 KB).

This makes the landing page actively misleading for any tester. Strangers click the link, get 404, conclude Hero OS doesn't work.

Fix: use path-relative links (services instead of /services) OR include the prefix dynamically (read X-Forwarded-Prefix per the hero_web reverse-proxy skill convention).

This is the primary blocker for a stranger self-serving from a public URL hand-off.

The cockpit landing page at `/hero_cockpit/web/` renders: ``` Try /services. See /.well-known/heroservice.json and /health. ``` These are root-relative paths. When the cockpit is served behind a path-prefix gateway (TFGrid Web Gateway, hero_router, reverse proxies in general), the gateway adds the prefix `/hero_cockpit/web/` to all served pages. Root-relative links bypass that prefix and 404. Live repro at s158 admin VM: `https://hcockpit.gent01.qa.grid.tf/hero_cockpit/web/` shows the landing page; clicking the `/services` link goes to `https://hcockpit.gent01.qa.grid.tf/services` which is 404. The real services dashboard lives at `https://hcockpit.gent01.qa.grid.tf/hero_cockpit/web/services` (HTTP 200, 188 KB). This makes the landing page actively misleading for any tester. Strangers click the link, get 404, conclude Hero OS doesn't work. Fix: use path-relative links (`services` instead of `/services`) OR include the prefix dynamically (read X-Forwarded-Prefix per the `hero_web` reverse-proxy skill convention). This is the primary blocker for a stranger self-serving from a public URL hand-off.
Author
Owner

Closed by hero_cockpit bac28da — landing page is now an Askama template extending base.html with base_path|safe-prefixed links. Direct-push squash to development did not auto-close (Forgejo only auto-closes on PR merge events). Verified clean on a fresh build.

Closed by [hero_cockpit `bac28da`](https://forge.ourworld.tf/lhumina_code/hero_cockpit/commit/bac28da) — landing page is now an Askama template extending `base.html` with `base_path|safe`-prefixed links. Direct-push squash to `development` did not auto-close (Forgejo only auto-closes on PR merge events). Verified clean on a fresh build.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_cockpit#7
No description provided.