From bb94d0353ef7db8a2aad025bdf02a1715b8c2e5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Giovanni=20Borella?= Date: Wed, 9 Jul 2025 18:59:45 +0200 Subject: [PATCH 1/2] Add GC2-API-KEY to allowed headers --- public/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/index.php b/public/index.php index b1c7628c1..3b0c6eeb0 100755 --- a/public/index.php +++ b/public/index.php @@ -131,7 +131,7 @@ } elseif (isset(App::$param["AccessControlAllowOrigin"]) && App::$param["AccessControlAllowOrigin"][0] == "*") { header("Access-Control-Allow-Origin: *"); } -header("Access-Control-Allow-Headers: Origin, Content-Type, Authorization, X-Requested-With, Accept, Session, Cache-Control"); +header("Access-Control-Allow-Headers: Origin, Content-Type, Authorization, X-Requested-With, Accept, Session, Cache-Control, GC2-API-KEY"); header("Access-Control-Allow-Credentials: true"); header("Access-Control-Allow-Methods: GET, PUT, POST, DELETE, HEAD, OPTIONS"); From 307513b077dcf844470768b549787df93a1635af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Giovanni=20Borella?= Date: Wed, 9 Jul 2025 19:02:33 +0200 Subject: [PATCH 2/2] Update CHANGELOG.md --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2bf647fe2..ea74640ee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [CalVer](https://calver.org/). +## Unreleased +### Fixed +- Added `GC2-API-KEY` to `Access-Control-Allow-Headers` to remove an error when calling feature-api and more from CORS-strict clients such as browsers. + ## [2025.7.0] - 2025-8-7 ### Added - New v4 API `api/v4/sql/database/[database]` which can be used without a token.