fix: inject auth pwd to host_file img tags

This commit is contained in:
Marcos
2026-03-22 00:09:25 -03:00
parent 0fa6ba954d
commit b0d38c3675

View File

@@ -948,8 +948,11 @@
const panel = document.getElementById('insights-panel');
if(!panel) return;
// Injeta a senha web nas URLs das imagens para autenticação inline
const mdWithAuth = markdown.replace(/\/api\/host_file\?path=/g, '/api/host_file?pwd=' + encodeURIComponent(webPassword) + '&path=');
// Renderiza o Markdown para HTML usando marked.js
panel.innerHTML = `<div class="animate-fade-in">${marked.parse(markdown)}</div>`;
panel.innerHTML = `<div class="animate-fade-in">${marked.parse(mdWithAuth)}</div>`;
}
function handleKeyPress(e) {