wrap all internal api calls with auth check and use token when possible

Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
Vladimir Mandic
2025-11-11 18:13:47 -05:00
parent f383a2babc
commit 8fb037d4d4
19 changed files with 55 additions and 24 deletions
+1 -1
View File
@@ -164,7 +164,7 @@ async function initModels() {
const el = gradioApp().getElementById('main_info');
const en = gradioApp().getElementById('txt2img_extra_networks');
if (!el || !en) return;
const req = await fetch(`${window.api}/sd-models`);
const req = await authFetch(`${window.api}/sd-models`);
const res = req.ok ? await req.json() : [];
log('initModels', res.length);
const ready = () => `