diff options
Diffstat (limited to 'app')
| -rw-r--r-- | app/controllers/csp_reports_controller.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/csp_reports_controller.rb b/app/controllers/csp_reports_controller.rb index a8f8edb..5a3b55e 100644 --- a/app/controllers/csp_reports_controller.rb +++ b/app/controllers/csp_reports_controller.rb | |||
| @@ -12,9 +12,9 @@ class CspReportsController < ApplicationController | |||
| 12 | if report | 12 | if report |
| 13 | directive = report["effective-directive"] || report["violated-directive"] | 13 | directive = report["effective-directive"] || report["violated-directive"] |
| 14 | at = (URI.parse(report["document-uri"]).path rescue "unparsed") | 14 | at = (URI.parse(report["document-uri"]).path rescue "unparsed") |
| 15 | Rails.logger.warn("CSP violation: #{directive} blocked=#{report['blocked-uri']} at=#{at}") | 15 | CSP_LOGGER.warn("CSP violation: #{directive} blocked=#{report['blocked-uri']} at=#{at}") |
| 16 | else | 16 | else |
| 17 | Rails.logger.warn("CSP violation: unparseable report (#{raw.to_s.bytesize} bytes)") | 17 | CSP_LOGGER.warn("CSP violation: unparseable report (#{raw.to_s.bytesize} bytes)") |
| 18 | end | 18 | end |
| 19 | 19 | ||
| 20 | head :no_content | 20 | head :no_content |
