Fix image authentication in relay app.html

Add password query parameter to image URLs in the relay server's
app.html - this file has its own inline JavaScript separate from
the main web/js/app.js

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-05 20:51:37 -08:00
parent 7d95d47c73
commit 5b6eb33bad

View File

@@ -427,7 +427,10 @@
} }
container.innerHTML = entries.map(([id, macro]) => { container.innerHTML = entries.map(([id, macro]) => {
const imageSrc = macro.image_path ? `/${this.sessionId}/api/image/${macro.image_path}` : null; // Include password as query param for image authentication
const imageSrc = macro.image_path
? `/${this.sessionId}/api/image/${macro.image_path}?password=${encodeURIComponent(this.password)}`
: null;
const firstChar = macro.name.charAt(0).toUpperCase(); const firstChar = macro.name.charAt(0).toUpperCase();
return ` return `
<div class="macro-card" data-macro-id="${id}" onclick="app.executeMacro('${id}')"> <div class="macro-card" data-macro-id="${id}" onclick="app.executeMacro('${id}')">