[PR #82] [MERGED] Web app works behind path-prefixed reverse proxies #2446

Closed
opened 2026-11-04 02:00:11 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/82
Author: @mikicvi
Created: 9/28/2026
Status: ✅ Merged
Merged: 9/29/2026
Merged by: @Niko1221

Base: main ← Head: web-relative-paths


📝 Commits (2)

  • f0e1b9e Web app works behind path-prefixed reverse proxies
  • 1270bf2 Merge branch 'main' into web-relative-paths

📊 Changes

3 files changed (+24 additions, -24 deletions)

View changed files

📝 serve/web/app.js (+7 -7)
📝 serve/web/index.html (+15 -15)
📝 serve/web/tokens.css (+2 -2)

📄 Description

The page referenced its stylesheet, script, sprite, fonts and every API call with absolute paths (/web/app.css, fetch("/health"), url("/fonts/...")). Behind a reverse proxy that mounts the app under a sub-path — llama-swap's /upstream/<model-id>/, an nginx subpath — those resolve to the proxy root and 404, leaving an unstyled page stuck at "Connecting…".

Changes, all mechanical:

  • index.html: (href|src)="/web/… → relative web/…
  • app.js: fetch("/… → fetch("… (every fetch in the app targets a same-origin endpoint served next to the page)
  • tokens.css: url("/fonts/… → url("../fonts/…" (fonts have their own top-level /fonts/ route, one level above the CSS)

Standalone at / resolves identically, so nothing changes there.

Verified behind llama-swap's /upstream/<model-id>/ prefix: page, all three stylesheets, fonts, sprite, /health, /settings and a streamed /v1/chat/completions POST all return 200, plus the same checks standalone at /.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/82 **Author:** [@mikicvi](https://github.com/mikicvi) **Created:** 9/28/2026 **Status:** ✅ Merged **Merged:** 9/29/2026 **Merged by:** [@Niko1221](https://github.com/Niko1221) **Base:** `main` ← **Head:** `web-relative-paths` --- ### 📝 Commits (2) - [`f0e1b9e`](https://github.com/Niko1221/Strata/commit/f0e1b9e9a934e754ac553f979eefa71345fa37af) Web app works behind path-prefixed reverse proxies - [`1270bf2`](https://github.com/Niko1221/Strata/commit/1270bf24622ebcd0d5af0c6f3b2b359bdc3685f7) Merge branch 'main' into web-relative-paths ### 📊 Changes **3 files changed** (+24 additions, -24 deletions) <details> <summary>View changed files</summary> 📝 `serve/web/app.js` (+7 -7) 📝 `serve/web/index.html` (+15 -15) 📝 `serve/web/tokens.css` (+2 -2) </details> ### 📄 Description The page referenced its stylesheet, script, sprite, fonts and every API call with absolute paths (`/web/app.css`, `fetch("/health")`, `url("/fonts/...")`). Behind a reverse proxy that mounts the app under a sub-path — llama-swap's `/upstream/<model-id>/`, an nginx subpath — those resolve to the proxy root and 404, leaving an unstyled page stuck at "Connecting…". Changes, all mechanical: - `index.html`: `(href|src)="/web/…` → relative `web/…` - `app.js`: `fetch("/…` → `fetch("…` (every fetch in the app targets a same-origin endpoint served next to the page) - `tokens.css`: `url("/fonts/…` → `url("../fonts/…"` (fonts have their own top-level `/fonts/` route, one level above the CSS) Standalone at `/` resolves identically, so nothing changes there. Verified behind llama-swap's `/upstream/<model-id>/` prefix: page, all three stylesheets, fonts, sprite, `/health`, `/settings` and a streamed `/v1/chat/completions` POST all return 200, plus the same checks standalone at `/`. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-04 02:00:11 +07:00
Sign in to join this conversation.
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
Niko1221/Strata#2446
No description provided.