From 311468161683c37f71eae1bbfe8086630c83755c Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Sun, 13 Feb 2022 19:30:59 +0000 Subject: [PATCH] Fix configuration of S3 URLs for security policy --- cookbooks/web/recipes/rails.rb | 9 ++------- cookbooks/web/resources/rails_port.rb | 12 ++++++++---- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/cookbooks/web/recipes/rails.rb b/cookbooks/web/recipes/rails.rb index 9f51581b4..457cd69ce 100644 --- a/cookbooks/web/recipes/rails.rb +++ b/cookbooks/web/recipes/rails.rb @@ -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 diff --git a/cookbooks/web/resources/rails_port.rb b/cookbooks/web/resources/rails_port.rb index 865114ccb..be979d693 100644 --- a/cookbooks/web/resources/rails_port.rb +++ b/cookbooks/web/resources/rails_port.rb @@ -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", -- 2.39.5