proxy print start command when needed

This commit is contained in:
Stewart Allen 2026-04-12 13:56:07 -04:00 • committed by Stewart Allen
commit 13420592dd
2 changed files with 5 additions and 2 deletions

View file

@ -284,9 +284,12 @@ function exportGCodeDialog(gcode, sections, info, names) {
}
api.show.progress(0);
if (start && type === 'moonraker') {
const headers = { 'Content-Type': 'application/json' };
if (proxy) hdr['X-Host'] = proxy;
if (apik) hdr['X-Api-Key'] = apik;
fetch(`${host}/printer/print/start`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
headers,
body: JSON.stringify({ filename })
})
.then(r => r.json())