Skip to content

Commit a9a92c5

Browse files
committed
Allow tile hosts in CSP connect-src for layer minimaps
1 parent 5f96c54 commit a9a92c5

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

config/initializers/content_security_policy.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@
77
# https://guides.rubyonrails.org/security.html#content-security-policy-header
88

99
Rails.application.configure do
10-
connect_src = [:self, "*.openhistoricalmap.org", "openhistoricalmap.github.io", "*.amazonaws.com"]
11-
img_src = [:self, :data, "www.gravatar.com", "*.wp.com", "tile.openstreetmap.org", "gps.tile.openstreetmap.org", "api.thunderforest.com", "tile.tracestrack.com", "*.openstreetmap.fr"]
10+
tile_src = ["tile.openstreetmap.org", "gps.tile.openstreetmap.org", "api.thunderforest.com", "tile.tracestrack.com", "*.openstreetmap.fr"]
11+
connect_src = [:self, "*.openhistoricalmap.org", "openhistoricalmap.github.io", "*.amazonaws.com", *tile_src]
12+
img_src = [:self, :data, "www.gravatar.com", "*.wp.com", *tile_src]
1213
script_src = [:self, "openhistoricalmap.github.io"]
1314
style_src = [:self, "openhistoricalmap.github.io"]
1415
worker_src = [:self, :blob, "0.0.0.0:3000"]

0 commit comments

Comments
 (0)