app/controllers/dashboard_controller.rb
# Endpoint reports CSP violations, indicating a possible security problem.
Endpoint reports CSP violations, indicating a possible security problem.
Endpoint reports CSP violations indicating a possible security problem .
def csp_reports
    payload = request.body.read || ""
    begin
      report = JSON.parse(payload)
    rescue
      report = {problem: "Crashed while parsing report"}
    end
    Rollbar.error("CSP VIOLATION!!!", report)
    render json: report
  end
def csp_reports payload = request . body . read || "" begin report = JSON . parse ( payload ) rescue report = { problem : "Crashed while parsing report" } end Rollbar . error ( "CSP VIOLATION!!!" , report ) render json : report end
Endpoint reports CSP violations, indicating a possible security problem.
Endpoint reports CSP violations indicating a possible security problem .