repositories
loading repo index
repositories
loading repo index
repository
loading code, commits, and activity
The Living OS cockpit
stars
latest
clone command
git clone gitlawb://did:key:z6Mku78K...XywC/living-os-cockp...git clone gitlawb://did:key:z6Mku78K.../living-os-cockp...59751530feat: surface worker supervisor health in live work6h ago| import { NextRequest, NextResponse } from 'next/server'; |
| #2 | import { proxyBridgeRequest } from '@/lib/bridge-proxy'; |
| #3 |
| #4 | export const runtime = 'nodejs'; |
| #5 |
| #6 | export async function GET(req: NextRequest) { |
| #7 | const upstream = await proxyBridgeRequest(req, '/health'); |
| #8 | const contentType = upstream.headers.get('content-type') ?? ''; |
| #9 | if (!contentType.includes('application/json')) return upstream; |
| #10 |
| #11 | try { |
| #12 | const body = await upstream.json(); |
| #13 | if (typeof body?.app === 'string' && body.app.startsWith('ai.theliving.')) { |
| #14 | body.app = 'ai.theliving.aethon'; |
| #15 | } |
| #16 | return NextResponse.json(body, { status: upstream.status }); |
| #17 | } catch { |
| #18 | return upstream; |
| #19 | } |
| #20 | } |
| #21 |