diff --git a/controller/app/api.py b/controller/app/api.py index cb65cf63..11be736d 100644 --- a/controller/app/api.py +++ b/controller/app/api.py @@ -27,6 +27,7 @@ origins = [ "http://localhost", "http://localhost:5173", + "*", ] app.add_middleware( diff --git a/frontend/src/routes/config/+page.svelte b/frontend/src/routes/config/+page.svelte index a7eec15d..92d8a2fe 100644 --- a/frontend/src/routes/config/+page.svelte +++ b/frontend/src/routes/config/+page.svelte @@ -14,15 +14,15 @@ $: state = data.state; async function saveConfig() { - await fetch('http://0.0.0.0:8000/state', { + await fetch('http://localhost:8000/state', { method: 'PATCH', headers: { 'content-type': 'application/json' }, body: JSON.stringify(state) }); - await invalidate('http://0.0.0.0:8000/state'); - await invalidate('http://0.0.0.0:8000/available_modules'); + await invalidate('http://localhost:8000/state'); + await invalidate('http://localhost:8000/available_modules'); } $: console.log(selected);