]> git.openstreetmap.org Git - chef.git/commitdiff
Fix configuration of S3 URLs for security policy
authorTom Hughes <tom@compton.nu>
Sun, 13 Feb 2022 19:30:59 +0000 (19:30 +0000)
committerTom Hughes <tom@compton.nu>
Sun, 13 Feb 2022 19:34:17 +0000 (19:34 +0000)
cookbooks/web/recipes/rails.rb
cookbooks/web/resources/rails_port.rb

index 9f51581b4f7bfae1e8a6ea99268aa45c0490a52c..457cd69cee250692a8fd8d6eb3e5f5bb7b08aa24 100644 (file)
@@ -136,17 +136,12 @@ rails_port "www.openstreetmap.org" do
   trace_use_job_queue true
   diary_feed_delay 12
   storage_configuration storage
-  storage_service "avatars"
-  storage_url "https://openstreetmap-user-avatars.s3.dualstack.eu-west-1.amazonaws.com"
   avatar_storage "avatars"
   trace_file_storage "gps_traces"
   trace_image_storage "gps_images"
   trace_icon_storage "gps_images"
-  storage_urls %w[
-    https://openstreetmap-user-avatars.s3.dualstack.eu-west-1.amazonaws.com
-    https://openstreetmap-gps-traces.s3.dualstack.eu-west-1.amazonaws.com
-    https://openstreetmap-gps-images.s3.dualstack.eu-west-1.amazonaws.com
-  ]
+  avatar_storage_url "https://openstreetmap-user-avatars.s3.dualstack.eu-west-1.amazonaws.com"
+  trace_image_storage_url "https://openstreetmap-gps-images.s3.dualstack.eu-west-1.amazonaws.com"
   overpass_url "https://query.openstreetmap.org/query-features"
 end
 
index 865114ccbf7f0ee26d19aa3df604a190b1e06b4a..be979d6935891bef39bd20d597eff87fa7c234fa 100644 (file)
@@ -71,16 +71,18 @@ property :totp_key, String
 property :csp_enforce, [true, false], :default => false
 property :csp_report_url, String
 property :piwik_configuration, Hash
+property :storage_service, String, :default => "local"
+property :storage_url, String
 property :trace_use_job_queue, [true, false], :default => false
 property :diary_feed_delay, Integer
 property :storage_configuration, Hash, :default => {}
-property :storage_service, String, :default => "local"
-property :storage_url, String
 property :avatar_storage, String
 property :trace_file_storage, String
 property :trace_image_storage, String
 property :trace_icon_storage, String
-property :storage_urls, Array
+property :avatar_storage_url, String
+property :trace_image_storage_url, String
+property :trace_icon_storage_url, String
 property :tile_cdn_url, String
 
 action :create do
@@ -335,7 +337,9 @@ action :create do
     "trace_file_storage",
     "trace_image_storage",
     "trace_icon_storage",
-    "storage_urls",
+    "avatar_storage_url",
+    "trace_image_storage_url",
+    "trace_icon_storage_url",
     "tile_cdn_url"
   ).compact.merge(
     "server_protocol" => "https",