mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 08:57:10 -06:00
allow CSP reports to be sent when header isn't set by Discourse (#6594)
This commit is contained in:
parent
4bac77800a
commit
7bc121a065
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user