Replaced Vite proxy with SvelteKit API route
This commit is contained in:
@@ -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',
|
||||
},
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user