From 2a334030b22877b452fa3c1dc9d9ef830703188c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kasper=20Garn=C3=A6s?= Date: Tue, 19 Dec 2023 11:24:50 +0100 Subject: [PATCH] Move CORS handling from platform.sh to app Platform.sh intends it to be this way. The reason this does not work was a misconfigured Laravel CORS package with the wrong path set. Drop the previous attempt to do CORS in platform.sh and fix the CORS path configuration to cover all requests. --- .platform.app.yaml | 2 -- config/cors.php | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.platform.app.yaml b/.platform.app.yaml index 5603f05..95ea3b8 100644 --- a/.platform.app.yaml +++ b/.platform.app.yaml @@ -76,8 +76,6 @@ web: - index.php allow: true passthru: "/index.php" - headers: - Access-Control-Allow-Origin: "*" variables: env: diff --git a/config/cors.php b/config/cors.php index 8a39e6d..3720dd1 100644 --- a/config/cors.php +++ b/config/cors.php @@ -15,7 +15,7 @@ | */ - 'paths' => ['api/*', 'sanctum/csrf-cookie'], + 'paths' => ['/*'], 'allowed_methods' => ['*'],