fix(headroom): proxy dashboard through app (#2372)
Add a 9Router-side proxy so the Headroom dashboard and its data endpoints (/stats, /health, /stats-history, /transformations/feed) stay same-origin when opened remotely through the 9Router app, and add an "Open Headroom Dashboard" link in the Token Saver modal. Gate /api/headroom/proxy as LOCAL_ONLY (loopback + CLI token) to match start/stop, and strip cookie/authorization when the Headroom target is non-loopback to avoid leaking viewer credentials. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
008de32c06
commit
481e7e467b
3 files changed
+115
No files matched your search
@@ -374,6 +374,16 @@ export default function TokenSaverClient() {
|
||||
{headroomStatusLabel}
|
||||
</span>
|
||||
</div>
|
||||
{headroomRunning && (
|
||||
<a
|
||||
href="/api/headroom/proxy/dashboard"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
className="w-full rounded border border-border px-4 py-2 text-center text-sm hover:bg-surface-2"
|
||||
>
|
||||
Open Headroom Dashboard
|
||||
</a>
|
||||
)}
|
||||
<div className="flex flex-col gap-1">
|
||||
<p className="text-sm font-medium">Proxy URL</p>
|
||||
<Input
|
||||
|
||||
Reference in new issue
Block a user