feat(F-099): completed feature

This commit is contained in:
chattie
2026-08-21 07:29:07 +02:00
parent 3f1d08382f
commit 5177a851aa
41 changed files with 922 additions and 131 deletions

View File

@@ -17,6 +17,16 @@ export async function GET(req: NextRequest) {
const backendRes = await fetch(`${API}/${path}`, {
headers: { Cookie: cookies },
});
if (path === 'admin/logs/stream') {
return new Response(backendRes.body, {
status: backendRes.status,
headers: {
'Content-Type': backendRes.headers.get('content-type') ?? 'text/event-stream',
'Cache-Control': backendRes.headers.get('cache-control') ?? 'no-cache',
Connection: 'keep-alive',
},
});
}
const data = await backendRes.json().catch(() => null);
const resp = NextResponse.json(data ?? { error: 'Bad response' }, { status: backendRes.status });
return resp;