mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #82] [MERGED] Web app works behind path-prefixed reverse proxies #2446
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#2446
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 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)
f0e1b9eWeb app works behind path-prefixed reverse proxies1270bf2Merge 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/…→ relativeweb/…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,/settingsand a streamed/v1/chat/completionsPOST 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.