Fix tunnel health check

This commit is contained in:
decolua
2026-05-21 14:30:59 +07:00
parent f9e68631d1
commit 134a70c62f
9 changed files with 113 additions and 23 deletions

View File

@@ -1,5 +1,15 @@
import { NextResponse } from "next/server";
const CORS_HEADERS = {
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Methods": "GET, OPTIONS",
"Access-Control-Allow-Headers": "*",
};
export async function GET() {
return NextResponse.json({ ok: true });
return NextResponse.json({ ok: true }, { headers: CORS_HEADERS });
}
export async function OPTIONS() {
return new NextResponse(null, { status: 204, headers: CORS_HEADERS });
}