← back to Ticket System
board: fetch via location.origin — fixes empty table when opened via credentials-in-URL (admin:pass@host); the /api fetches inherited the userinfo and threw. Table now populates regardless of load method (TK-10429)
6ab4daff70e0646e8a239b4f2c2b239e0c2f27b5 · 2026-08-10 16:01:13 -0700 · steve
Files touched
Diff
commit 6ab4daff70e0646e8a239b4f2c2b239e0c2f27b5
Author: steve <steve@designerwallcoverings.com>
Date: Mon Aug 10 16:01:13 2026 -0700
board: fetch via location.origin — fixes empty table when opened via credentials-in-URL (admin:pass@host); the /api fetches inherited the userinfo and threw. Table now populates regardless of load method (TK-10429)
---
board.html | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/board.html b/board.html
index 9c6e7152..e9730d99 100644
--- a/board.html
+++ b/board.html
@@ -194,7 +194,8 @@ function dmPanel(mm){
}
async function load(){
try{
- const [t,m]=await Promise.all([fetch('/api/tickets').then(r=>r.json()),fetch('/api/messages').then(r=>r.json())]);
+ const base=location.origin; // never carries userinfo — fixes "URL includes credentials" fetch error when opened via admin:pass@host
+ const [t,m]=await Promise.all([fetch(base+'/api/tickets').then(r=>r.json()),fetch(base+'/api/messages').then(r=>r.json())]);
DATA=t; LASTMSG=m; render(); dmPanel(m);
}catch(e){$('#tbody').innerHTML=`<tr><td>load failed: ${esc(e.message)}</td></tr>`;}
}
← c65f1c1b board: on/off toggles for all four field groups — columns (▦
·
back to Ticket System
·
board: split the combined total/shown pill into two independ dddb9a42 →