fix post-merge ci regressions (#5467)

This commit is contained in:
KooshaPari
2026-06-29 18:03:22 -07:00
committed by GitHub
parent 8811468269
commit 3e03213ed0
2 changed files with 7 additions and 1 deletions

View File

@@ -39,7 +39,7 @@ COPY package*.json ./
# Workspace package manifests MUST be present before `npm ci` so npm materializes
# the workspace and installs its *workspace-only* deps (e.g. safe-regex,
# @toon-format/toon — declared in open-sse/package.json, not hoisted to root).
# Without this, `npm ci` skips them and `npm run build` fails with "Module not
# Without this, `npm ci` skips them and the application build fails with "Module not
# found" (root cause of the v3.8.39 Docker build break). workspaces = ["open-sse"].
COPY open-sse/package.json ./open-sse/package.json
COPY scripts/build/postinstall.mjs ./scripts/build/postinstall.mjs

View File

@@ -3,6 +3,7 @@ import { z } from "zod";
import { requireManagementAuth } from "@/lib/api/requireManagementAuth";
import { executeProviderHealthAutopilotAction } from "@/lib/monitoring/providerHealthAutopilot";
import { validateBrowserMutationOrigin } from "@/server/origin/publicOrigin";
import { validateBody } from "@/shared/validation/helpers";
const actionSchema = z.object({
@@ -28,6 +29,11 @@ export async function POST(request: Request) {
const authError = await requireManagementAuth(request);
if (authError) return authError;
const originVerdict = validateBrowserMutationOrigin(request);
if (!originVerdict.ok) {
return NextResponse.json({ error: { message: "Invalid request origin" } }, { status: 403 });
}
try {
let rawBody: unknown;
try {