]> git.openstreetmap.org Git - chef.git/commitdiff
Configure imagery blacklist for the web site
authorTom Hughes <tom@compton.nu>
Thu, 13 Jul 2023 19:12:33 +0000 (20:12 +0100)
committerTom Hughes <tom@compton.nu>
Thu, 13 Jul 2023 19:12:49 +0000 (20:12 +0100)
cookbooks/web/recipes/rails.rb
cookbooks/web/resources/rails_port.rb

index 8a2acef3267634b8c8e2e037fb65a21062269313..f321ef537c0827cb142ec37e0550e82067458003 100644 (file)
@@ -143,6 +143,16 @@ rails_port "www.openstreetmap.org" do
   trace_image_storage_url "https://openstreetmap-gps-images.s3.dualstack.eu-west-1.amazonaws.com"
   overpass_url "https://query.openstreetmap.org/query-features"
   overpass_credentials true
+  imagery_blacklist [
+    # Current Google imagery URLs have google or googleapis in the domain
+    ".*\\.google(apis)?\\..*/.*",
+    # Blacklist VWorld
+    "http://xdworld\\.vworld\\.kr:8080/.*",
+    # Blacklist here
+    ".*\\.here\\.com[/:].*",
+    # Blacklist Mapy.cz
+    ".*\\.mapy\\.cz.*"
+  ]
 end
 
 systemd_service "rails-jobs@" do
index e92c03bd4bf298cccbb1173716989c51a9f8a2a5..4825307b2039aaa81b9cc208dfd10136503a2928 100644 (file)
@@ -85,6 +85,7 @@ property :avatar_storage_url, String
 property :trace_image_storage_url, String
 property :trace_icon_storage_url, String
 property :tile_cdn_url, String
+property :imagery_blacklist, Array
 
 action :create do
   package %W[
@@ -334,7 +335,8 @@ action :create do
     "avatar_storage_url",
     "trace_image_storage_url",
     "trace_icon_storage_url",
-    "tile_cdn_url"
+    "tile_cdn_url",
+    "imagery_blacklist"
   ).compact.merge(
     "server_protocol" => "https",
     "server_url" => new_resource.site,