All checks were successful
03.12.2026 платформа переехала на forge.vibe42.kz; имена *.telecom.quest больше не ведут на сервер. В настройках каждого проекта остался старый адрес платформы (отчёты проверок и выкладок идут в никуда) и старые имена стендов. - edgeHostKnown и GET /api/edge/host: прокси сервера спрашивает, своё ли имя, перед выпуском сертификата на адрес продукта. - syncProjectAddress и peppa project address <KEY|--all> [--dry-run]: коммит бота правит peppaUrl и deploy.hosts; свои адреса владельца не трогает. - Новый проект получает deploy.hosts под PEPPA_DEPLOY_DOMAIN. Тест project-address.test.ts. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
14 lines
737 B
TypeScript
14 lines
737 B
TypeScript
// PEP-337: the server's proxy asks «is this name ours?» before it gets a certificate for a product's
|
|
// address (Caddy on-demand TLS, `ask`). No sign-in: the proxy calls it from the server itself; the
|
|
// answer says only whether a name is a known stand.
|
|
import { edgeHostKnown } from "@peppa/core";
|
|
import { db } from "@/lib/db";
|
|
|
|
export const dynamic = "force-dynamic";
|
|
|
|
export async function GET(req: Request) {
|
|
const host = new URL(req.url).searchParams.get("domain") ?? "";
|
|
const ok = host.length > 0 && host.length <= 253 && (await edgeHostKnown(db, host).catch(() => false));
|
|
return new Response(ok ? "ok" : "unknown", { status: ok ? 200 : 404, headers: { "cache-control": "no-store", "content-type": "text/plain" } });
|
|
}
|