{"record":{"id":"1db397f810f36d7b","repo":"diegosouzapw/OmniRoute","slug":"invalid-origin","errorCode":"INVALID_ORIGIN","errorMessage":"Invalid request origin. Same-origin dashboard writes must include a valid dashboard CSRF token. Refresh the dashboard and retry, or set OMNIROUTE_PUBLIC_BASE_URL for non-dashboard browser integrations.","messagePattern":"Invalid request origin\\. Same-origin dashboard writes must include a valid dashboard CSRF token\\. Refresh the dashboard and retry, or set OMNIROUTE_PUBLIC_BASE_URL for non-dashboard browser integrations\\.","errorType":"http","errorClass":null,"httpStatus":403,"severity":"error","filePath":"src/server/authz/pipeline.ts","lineNumber":217,"sourceCode":"    {\n      error: {\n        code: \"SERVICE_UNAVAILABLE\",\n        message: \"Server is shutting down\",\n        correlation_id: requestId,\n      },\n    },\n    { status: 503 }\n  );\n  response.headers.set(AUTHZ_HEADER_REQUEST_ID, requestId);\n  response.headers.set(\"Retry-After\", \"5\");\n  return response;\n}\n\nfunction invalidOriginResponse(requestId: string): NextResponse {\n  const response = NextResponse.json(\n    {\n      error: {\n        code: \"INVALID_ORIGIN\",\n        message:\n          \"Invalid request origin. Same-origin dashboard writes must include a valid dashboard CSRF token. \" +\n          \"Refresh the dashboard and retry, or set OMNIROUTE_PUBLIC_BASE_URL for non-dashboard browser integrations.\",\n        correlation_id: requestId,\n      },\n    },\n    { status: 403 }\n  );\n  response.headers.set(AUTHZ_HEADER_REQUEST_ID, requestId);\n  return response;\n}\n\nfunction isUnsafeMutationMethod(method: string): boolean {\n  return ![\"GET\", \"HEAD\", \"OPTIONS\"].includes(method.toUpperCase());\n}\n\nfunction stampRouteResponse(\n  response: Response,","sourceCodeStart":199,"sourceCodeEnd":235,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/src/server/authz/pipeline.ts#L199-L235","documentation":"Error \"Invalid request origin. Same-origin dashboard writes must include a valid dashboard CSRF token. Refresh the dashboard and retry, or set OMNIROUTE_PUBLIC_BASE_URL for non-dashboard browser integrations.\" thrown in diegosouzapw/OmniRoute.","triggerScenarios":"Thrown at src/server/authz/pipeline.ts:217 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d","analyzedAt":"2026-08-25T18:35:09.898Z","schemaVersion":2},"datasetVersion":"2026-08-25T21:54:21.419Z"}