Skip to content

Commit

Permalink
Disabling content security protection for /letter_opener requests in …
Browse files Browse the repository at this point in the history
…dev env.
  • Loading branch information
bradly authored and simi committed Mar 11, 2024
1 parent af50210 commit a58b43d
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions config/initializers/letter_opener.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
return unless Rails.env.development?

Rails.configuration.to_prepare do
LetterOpenerWeb::ApplicationController.content_security_policy do |policy|
policy.style_src :self, :unsafe_inline
policy.img_src :self, 'data:'
end
LetterOpenerWeb::ApplicationController.content_security_policy false
end

0 comments on commit a58b43d

Please sign in to comment.