mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 01:04:32 +02:00
api refactor: force access control and handle subpaths
Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
@@ -70,7 +70,7 @@ async function logMonitor() {
|
||||
if (!logMonitorEl) return;
|
||||
const atBottom = logMonitorEl.scrollHeight <= (logMonitorEl.scrollTop + logMonitorEl.clientHeight);
|
||||
try {
|
||||
const res = await fetch('/sdapi/v1/log?clear=True');
|
||||
const res = await fetch(`${window.api}/log?clear=True`);
|
||||
if (res?.ok) {
|
||||
logMonitorStatus = true;
|
||||
const lines = await res.json();
|
||||
@@ -116,7 +116,7 @@ async function initLogMonitor() {
|
||||
</table>
|
||||
`;
|
||||
el.style.display = 'none';
|
||||
fetch(`/sdapi/v1/start?agent=${encodeURI(navigator.userAgent)}`);
|
||||
fetch(`${window.api}/start?agent=${encodeURI(navigator.userAgent)}`);
|
||||
logMonitor();
|
||||
log('initLogMonitor');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user