From 25e83be493e4a11954dfd7133c55f395b5e7220c Mon Sep 17 00:00:00 2001 From: Matias De lellis Date: Thu, 19 May 2022 11:23:41 -0300 Subject: [PATCH] Handle OPTION(CORS) calls to use the API in web apps. Issue #80 --- appinfo/routes.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/appinfo/routes.php b/appinfo/routes.php index 9bb1c32..f0ec3c7 100644 --- a/appinfo/routes.php +++ b/appinfo/routes.php @@ -33,6 +33,12 @@ return ['resources' => 'name' => 'settings#getUserValue', 'url' => '/getuservalue', 'verb' => 'GET' + ], + [ + 'name' => 'noteApi#preflighted_cors', + 'url' => '/api/v1/{path}', + 'verb' => 'OPTIONS', + 'requirements' => ['path' => '.+'] ] ] ];