fix: inject auth pwd to host_file img tags
This commit is contained in:
@@ -948,8 +948,11 @@
|
|||||||
const panel = document.getElementById('insights-panel');
|
const panel = document.getElementById('insights-panel');
|
||||||
if(!panel) return;
|
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
|
// 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) {
|
function handleKeyPress(e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user