about summary refs log tree commit diff
path: root/config/initializers
diff options
context:
space:
mode:
Diffstat (limited to 'config/initializers')
-rw-r--r--config/initializers/content_security_policy.rb4
-rw-r--r--config/initializers/simple_form.rb13
2 files changed, 2 insertions, 15 deletions
diff --git a/config/initializers/content_security_policy.rb b/config/initializers/content_security_policy.rb
index ce8aa7af2..c6fff9889 100644
--- a/config/initializers/content_security_policy.rb
+++ b/config/initializers/content_security_policy.rb
@@ -33,9 +33,9 @@ if Rails.env.production?
     p.frame_ancestors :none
     p.script_src      :self, assets_host, "'wasm-unsafe-eval'"
     p.font_src        :self, assets_host
-    p.img_src         :self, :data, :blob, *data_hosts
+    p.img_src         :self, :data, :blob, *data_hosts, "pool.jortage.com", "blob.jortage.com", "s3-us-east-2.amazonaws.com"
     p.style_src       :self, assets_host
-    p.media_src       :self, :data, *data_hosts
+    p.media_src       :self, :data, *data_hosts, "pool.jortage.com", "blob.jortage.com", "s3-us-east-2.amazonaws.com"
     p.frame_src       :self, :https
     p.child_src       :self, :blob, assets_host
     p.worker_src      :self, :blob, assets_host
diff --git a/config/initializers/simple_form.rb b/config/initializers/simple_form.rb
index fff4f538e..2de22a945 100644
--- a/config/initializers/simple_form.rb
+++ b/config/initializers/simple_form.rb
@@ -8,17 +8,6 @@ module AppendComponent
   end
 end
 
-module RecommendedComponent
-  def recommended(_wrapper_options = nil)
-    return unless options[:recommended]
-
-    key = options[:recommended].is_a?(Symbol) ? options[:recommended] : :recommended
-    options[:label_text] = ->(raw_label_text, _required_label_text, _label_present) { safe_join([raw_label_text, ' ', content_tag(:span, I18n.t(key, scope: 'simple_form'), class: key)]) }
-
-    nil
-  end
-end
-
 module GlitchOnlyComponent
   def glitch_only(_wrapper_options = nil)
     return unless options[:glitch_only]
@@ -29,7 +18,6 @@ module GlitchOnlyComponent
 end
 
 SimpleForm.include_component(AppendComponent)
-SimpleForm.include_component(RecommendedComponent)
 SimpleForm.include_component(GlitchOnlyComponent)
 
 SimpleForm.setup do |config|
@@ -87,7 +75,6 @@ SimpleForm.setup do |config|
     b.use :html5
 
     b.wrapper tag: :div, class: :label_input do |ba|
-      ba.optional :recommended
       ba.optional :glitch_only
       ba.use :label