Skip to content

Commit

Permalink
Fix tiles not working on public pages because of missing CSP entries
Browse files Browse the repository at this point in the history
A CSP entry for https://tile.openstreetmap.org was introduced in
8e9e960, but it was only added
to the PageController but it should be added to all the places
where the CSP headers are generated.

Signed-off-by: chefe <hi@chefe.io>
  • Loading branch information
chefe committed Jan 1, 2025
1 parent d5ec6df commit b1dec52
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/Controller/PublicFavoritePageController.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ private function addCsp($response): void {
$csp = new ContentSecurityPolicy();
// map tiles
$csp->addAllowedImageDomain('https://*.tile.openstreetmap.org');
$csp->addAllowedImageDomain('https://tile.openstreetmap.org');
$csp->addAllowedImageDomain('https://server.arcgisonline.com');
$csp->addAllowedImageDomain('https://*.cartocdn.com');
$csp->addAllowedImageDomain('https://*.opentopomap.org');
Expand Down
1 change: 1 addition & 0 deletions lib/Controller/PublicPageController.php
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ private function addCsp($response): void {
$csp = new \OCP\AppFramework\Http\ContentSecurityPolicy();
// map tiles
$csp->addAllowedImageDomain('https://*.tile.openstreetmap.org');
$csp->addAllowedImageDomain('https://tile.openstreetmap.org');
$csp->addAllowedImageDomain('https://server.arcgisonline.com');
$csp->addAllowedImageDomain('https://*.cartocdn.com');
$csp->addAllowedImageDomain('https://*.opentopomap.org');
Expand Down

0 comments on commit b1dec52

Please sign in to comment.