0.2 在线版本打通

This commit is contained in:
liaibo
2026-01-15 20:54:21 +08:00
parent 725a60d3aa
commit 94957dc361
1596 changed files with 153254 additions and 309 deletions
@@ -1,9 +1,14 @@
import { NextResponse } from "next/server";
import { getMnoteRuntimeConfig } from "@/lib/runtime-config";
export const dynamic = "force-dynamic";
export async function GET() {
const backendUrl = process.env.BACKEND_URL ?? process.env.NEXT_PUBLIC_BACKEND_URL;
// 说明:浏览器端需要走公网(FRP),但 Next 服务端在本机时应优先走内网/本机(HTTP),
// 否则会遇到 FRP Auto HTTPS 的自签证书导致 Node fetch 失败。
const cfg = getMnoteRuntimeConfig();
const backendUrl =
process.env.BACKEND_INTERNAL_URL || process.env.BACKEND_URL || cfg.backendUrl;
if (!backendUrl) {
return NextResponse.json({ status: "disabled" }, { status: 200 });
}
@@ -22,4 +27,3 @@ export async function GET() {
clearTimeout(timer);
}
}