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

content security policy #25

Open
glaszig opened this issue Aug 21, 2022 · 0 comments
Open

content security policy #25

glaszig opened this issue Aug 21, 2022 · 0 comments

Comments

@glaszig
Copy link

glaszig commented Aug 21, 2022

as this engine depends on unsafe-inline and unsafe-eval in the script-src directives i decided to disable my csp only for this engine. to accomplish this i put the following into an initializer. with some more involved code one should be able to swap the existing policy in request.content_security_policy at runtime but i'll leave that to somebody else.

RedisAnalytics::Dashboard::Engine.class_eval do
  config.to_prepare do
    RedisAnalytics::ApplicationController.class_eval do
      content_security_policy false
    end
  end
end
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