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 */