mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-11-20 04:59:34 +01:00
rebaseRelativeBase resolved a relative <base> against the proxy root, so a document served from a subdirectory of its dashboard (for example /webview/<cap>/app/page.html with <base href="./">) pointed at /webview/<cap>/ and loaded its assets one level too high. Pass the request's wildcard path into rewriteHtml and resolve the base against the document URL, which keeps the proxy root for the landing page.
666 B
666 B
aicodeman
| aicodeman |
|---|
| patch |
Web tabs whose dashboard ships a relative <base href> render again. The proxy rewrites the document URL to strip its /webview/<cap>/ prefix, and a relative base is resolved against that URL — so ./ (what Vite builds emit, DeepSeek Harness among them) pointed at Codeman's root: every module script 404'd and the page painted its background with nothing on it. The rewrite now resolves such a base against the document's own directory inside the proxy prefix before the mask runs (a page at /webview/<cap>/app/page.html gets /webview/<cap>/app/, not the proxy root); a cross-origin base is left exactly as the author wrote it.