diff --git a/next.config.js b/next.config.js index 0da4b75..acb8373 100644 --- a/next.config.js +++ b/next.config.js @@ -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 diff --git a/pages/api/check.ts b/pages/api/check.ts deleted file mode 100644 index 9b771a9..0000000 --- a/pages/api/check.ts +++ /dev/null @@ -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 { - const target = await req.json() - 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" } } - ) -}