From 6aafc8ae91a6f999d5dfea9d47264738286efcb4 Mon Sep 17 00:00:00 2001 From: velz Date: Tue, 25 Nov 2025 15:02:47 +0530 Subject: [PATCH] FIX_OPTIONS_ROUTE_ADDED_4_CORS --- app/Config/Routes.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/Config/Routes.php b/app/Config/Routes.php index 2e8d6fb3..96252c3f 100755 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -3,6 +3,13 @@ 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 */