diff --git a/app/controllers/csp_reports_controller.rb b/app/controllers/csp_reports_controller.rb index 9b81840607f..b0b10912705 100644 --- a/app/controllers/csp_reports_controller.rb +++ b/app/controllers/csp_reports_controller.rb @@ -30,6 +30,6 @@ class CspReportsController < ApplicationController end def report_collection_enabled? - ContentSecurityPolicy.enabled? && SiteSetting.content_security_policy_collect_reports + SiteSetting.content_security_policy_collect_reports end end diff --git a/spec/requests/csp_reports_controller_spec.rb b/spec/requests/csp_reports_controller_spec.rb index e4568776ddb..51852fea0b3 100644 --- a/spec/requests/csp_reports_controller_spec.rb +++ b/spec/requests/csp_reports_controller_spec.rb @@ -37,7 +37,7 @@ describe CspReportsController do SiteSetting.content_security_policy_report_only = false SiteSetting.content_security_policy_collect_reports = true send_report - expect(response.status).to eq(404) + expect(response.status).to eq(200) SiteSetting.content_security_policy = true send_report