mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-07-31 04:12:10 +03:00
fix post-merge ci regressions (#5467)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user