Replaced Vite proxy with SvelteKit API route

This commit is contained in:
2026-05-08 12:22:37 +02:00
parent e6ce118333
commit 11bddcac70
2 changed files with 9 additions and 5 deletions
+9
View File
@@ -0,0 +1,9 @@
export async function GET({ params, url }) {
const res = await fetch(`http://37100lab.it:8101/api/${params.path}${url.search}`);
return new Response(res.body, {
status: res.status,
headers: {
'content-type': res.headers.get('content-type') ?? 'application/json',
},
});
}