Skip to content

Open-source status page, incident response and uptime monitoring

Add an additional ping endpoint for separate testing (#681)

Malte Ublf91e56c51692
diff --git a/apps/web/src/app/api/ping/test/route.ts b/apps/web/src/app/api/ping/test/route.ts
new file mode 100644
index 000000000..6c299e2de
--- /dev/null
+++ b/apps/web/src/app/api/ping/test/route.ts
@@ -0,0 +1,14 @@
+import { NextResponse } from "next/server";
+
+export const dynamic = "force-dynamic";
+
+export const maxDuration = 31; // to trick and not using the same function as the other ping route
+
+export async function GET() {
+ return NextResponse.json({ ping: "pong" }, { status: 200 });
+}
+
+export async function POST(req: Request) {
+ const body = await req.json();
+ return NextResponse.json({ ping: body }, { status: 200 });
+}