Repository navigation
fix: update stale CSP meta tag in dashboard.html to allow Esri tiles - #20
Merged
Merged
Conversation
dashboard.html carries its own <meta http-equiv="Content-Security-Policy"> in addition to the HTTP header CSP set by vercel.json. When the admin preview map's tile provider was switched from OSM to Esri's arcgisonline.com (see the earlier organization-network-map.html / admin.js fix), vercel.json's header was updated but this duplicate meta-tag CSP was missed. Browsers enforce both CSPs by intersection (most restrictive wins per directive), so the stale img-src here was silently blocking the preview map's tiles in production regardless of the header fix. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018KR2ZSHK8Skmyd1zyTaw7v
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The targeted CSP update correctly matches the tile provider and configured header.
Review effort: Balanced
Findings: None
What changed in this PR
Updates the dashboard’s CSP to permit Esri preview-map tiles.
Changes:
- Replaces the obsolete OpenStreetMap image source with Esri’s tile host.
- Aligns
img-srcwith the admin CSP header.
| File | Description |
|---|---|
admin/dashboard.html |
Allows images from server.arcgisonline.com. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
admin/dashboard.htmlcarries its own<meta http-equiv="Content-Security-Policy">in addition to the HTTP header CSP set byvercel.json. When the admin preview map's tile provider was switched from OSM to Esri'sarcgisonline.com,vercel.json's header was updated but this duplicate meta-tag CSP was missed.Browsers enforce both CSPs by intersection (most restrictive wins per directive), so the stale
img-srchere was silently blocking the preview map's tiles in production regardless of the header fix — found while reading this file in preparation for unrelated work.Test plan
npm run validatepasses unchanged.img-srcnow matchesvercel.json's header exactly.🤖 Generated with Claude Code