mirror of
https://github.com/discourse/discourse.git
synced 2026-08-06 06:24:48 +08:00
When disabled, admins will be shown this warning in the dashboard: > The content-security-policy feature has been disabled. This is an important security feature, and should never be disabled in production environments. <a href=''>Re-enable it here</a>.
11 lines
216 B
Ruby
Vendored
11 lines
216 B
Ruby
Vendored
# frozen_string_literal: true
|
|
|
|
class ProblemCheck::ContentSecurityPolicyDisabled < ProblemCheck
|
|
self.priority = "low"
|
|
|
|
def call
|
|
return no_problem if SiteSetting.content_security_policy
|
|
|
|
problem
|
|
end
|
|
end
|