Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not compatible with Rails 5.2 CSP #28

Open
pradeepkumar-powerschool opened this issue Jan 12, 2024 · 0 comments
Open

Not compatible with Rails 5.2 CSP #28

pradeepkumar-powerschool opened this issue Jan 12, 2024 · 0 comments

Comments

@pradeepkumar-powerschool
Copy link

pradeepkumar-powerschool commented Jan 12, 2024

Issue
When trying to implement CSP(content security policy) in Rails 5.2 Trix editor breaks. can anyone help here with how to fix it?

Code added in application.rb

      config.content_security_policy do |policy|
        policy.default_src :self, :https
        policy.font_src    :self, :https, :data
        policy.img_src     :self, :https, :data
        policy.object_src  :none
        policy.script_src  :self, :https
        policy.style_src   :self, :https
      end

rendered editor:-
Screenshot 2024-01-12 at 6 48 32 PM

Environment (please complete the following information):

  • Rails version: 5.2.4
  • trix-rails version: 2.3.0
  • Browser:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant