From 30ffd7648c832317845d615094dc2714909238fb Mon Sep 17 00:00:00 2001 From: velz Date: Tue, 25 Nov 2025 15:05:21 +0530 Subject: [PATCH] FIX_OPTIONS_ROUTE_ADDED4_CORS --- app/Config/Routes.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/Config/Routes.php b/app/Config/Routes.php index d5cc961..7cdb968 100755 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -3,6 +3,14 @@ use CodeIgniter\Router\RouteCollection; + +// Allow OPTIONS for all routes +$routes->options('(:any)', function() { + // This will never be called because the CORS filter returns early + // But having this route ensures OPTIONS isn't rejected as 404 +}); + + /** * @var RouteCollection $routes */