From 3204671edc75fab848b1b7c17a6635381bff3ae0 Mon Sep 17 00:00:00 2001 From: Lizandro Guarnizo <77708265+lizandrogd@users.noreply.github.com> Date: Thu, 9 Jul 2026 10:56:55 -0500 Subject: [PATCH] fix(ingest_paciente): agregar CORS headers para preflight OPTIONS Incluye Access-Control-Allow-Headers con X-Lab-Key para que el navegador pueda hacer el preflight desde RIPS Manager. Co-Authored-By: Claude Sonnet 4.6 --- api/lab/ingest_paciente.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/api/lab/ingest_paciente.php b/api/lab/ingest_paciente.php index 17b74d6..5183594 100644 --- a/api/lab/ingest_paciente.php +++ b/api/lab/ingest_paciente.php @@ -31,6 +31,10 @@ register_shutdown_function(function () { }); header('Content-Type: application/json; charset=utf-8'); +header('Access-Control-Allow-Origin: *'); +header('Access-Control-Allow-Methods: POST, OPTIONS'); +header('Access-Control-Allow-Headers: Content-Type, X-Lab-Key, X-Lab-Sync-Key'); +header('Access-Control-Max-Age: 86400'); if ($_SERVER['REQUEST_METHOD'] === 'OPTIONS') { http_response_code(204);