Skip to content

Sobelow still reports an issue #2

Description

@mplatts

Using the plug ContentSecurityPolicy.Plug.Setup was causing Sobelow to still complain.

So I did this to fix it:


@content_security_policy %ContentSecurityPolicy.Policy{
    default_src: [
      "'unsafe-inline'",
      "'unsafe-eval'",
      "'self'",
      "https://cdnjs.cloudflare.com",
      "https://cdn.skypack.dev",
      "https://res.cloudinary.com"
    ]
  }

pipeline :browser do
  ...
  plug(:put_secure_browser_headers, %{"content-security-policy" => ContentSecurityPolicy.serialize(@content_security_policy)})
  ...
end

Not sure if there is a better way?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions