Skip to content

fix(csp): protomaps sources#1438

Open
curbengh wants to merge 2 commits intonextcloud:masterfrom
curbengh:protomaps
Open

fix(csp): protomaps sources#1438
curbengh wants to merge 2 commits intonextcloud:masterfrom
curbengh:protomaps

Conversation

@curbengh
Copy link
Contributor

@curbengh curbengh commented Aug 11, 2025

add protomaps github pages url to CSP connect-src when using protomaps api for maplibre.
protomaps hosts glyphs and sprite on their github pages.

https://api.protomaps.com/styles/v5/light/en.json?key=MY_KEY

{
  "version": 8,
  "name": "style@5.0.0 flavor@light lang@en",
  "glyphs": "https://protomaps.github.io/basemaps-assets/fonts/{fontstack}/{range}.pbf",
  "sprite": "https://protomaps.github.io/basemaps-assets/sprites/v4/light",
  "sources": {
    "protomaps": {
      "attribution": "<a href=\"https://github.com/protomaps/basemaps\">Protomaps</a> © <a href=\"https://openstreetmap.org\">OpenStreetMap</a>",
      "type": "vector",
      "tiles": [
        "https://api.protomaps.com/tiles/v4/{z}/{x}/{y}.mvt?key=MY_KEY"
      ],
      "maxzoom": 15
    }
  }
}

when using protomaps api for maplibre

Signed-off-by: Ming Di Leom <43627182+curbengh@users.noreply.github.com>
@curbengh curbengh changed the title fix(csp): add protomaps github pages fix(csp): conditionally add protomaps github pages Aug 11, 2025
@curbengh curbengh changed the title fix(csp): conditionally add protomaps github pages fix(csp): protomaps sources Sep 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments