From 5287dfcd0ebdc643581328549f0dd62ef1db8b0e Mon Sep 17 00:00:00 2001 From: Ming Di Leom <43627182+curbengh@users.noreply.github.com> Date: Mon, 11 Aug 2025 09:27:55 +0000 Subject: [PATCH] fix(csp): add protomaps github pages when using protomaps api for maplibre Signed-off-by: Ming Di Leom <43627182+curbengh@users.noreply.github.com> --- lib/Controller/AddCspTrait.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/Controller/AddCspTrait.php b/lib/Controller/AddCspTrait.php index 45848d358..a3fc14dc4 100644 --- a/lib/Controller/AddCspTrait.php +++ b/lib/Controller/AddCspTrait.php @@ -47,6 +47,10 @@ private function addCsp(Response $response): void { $cleanUrl .= ':' . $port; } $csp->addAllowedConnectDomain($cleanUrl); + + if ($host === 'api.protomaps.com') { + $csp->addAllowedConnectDomain('https://protomaps.github.io'); + } } }