remove pages check API

This commit is contained in:
lyc8503 committed 2025-04-13 23:04:40 +08:00
1 parent a293f98185
commit 44594ca320
2 files changed
+1 -25

No files matched your search

+1 -5
View File
@@ -1,10 +1,6 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
webpack: (config, { webpack }) => {
config.externals["cloudflare:sockets"] = "cloudflare:sockets"
return config
},
reactStrictMode: true
}
module.exports = nextConfig
-20
View File
@@ -1,20 +0,0 @@
import { NextRequest } from "next/server"
import { getStatus } from "@/worker/src/monitor"
import { getWorkerLocation } from "@/worker/src/util"
import { MonitorTarget } from "@/uptime.types"
export const runtime = 'edge'
// Check proxy if moved from Workers to Pages, https://github.com/lyc8503/UptimeFlare/issues/86#issuecomment-2655187257
export default async function handler(req: NextRequest): Promise<Response> {
const target = await req.json<MonitorTarget>()
const colo = await getWorkerLocation()
console.log("Check proxy running at " + colo + ", Target: " + target)
return new Response(
JSON.stringify({
location: colo,
status: await getStatus(target),
}),
{ headers: { "Content-Type": "application/json" } }
)
}