class MediaWiktory::Wikipedia::Actions::Cspreport

Used by browsers to report violations of the Content Security Policy. This module should never be used, except when used automatically by a CSP compliant web browser.

Usage:

“`ruby api.cspreport.reportonly(value).perform # returns string with raw output # or api.cspreport.reportonly(value).response # returns output parsed and wrapped into Response object “`

See {Base} for generic explanation of working with MediaWiki actions and {MediaWiktory::Wikipedia::Response} for working with action responses.

All action's parameters are documented as its public methods, see below.

Public Instance Methods

reportonly() click to toggle source

Mark as being a report from a monitoring policy, not an enforced policy

@return [self]

# File lib/mediawiktory/wikipedia/actions/cspreport.rb, line 25
def reportonly()
  merge(reportonly: 'true')
end
source(value) click to toggle source

What generated the CSP header that triggered this report

@param value [String] @return [self]

# File lib/mediawiktory/wikipedia/actions/cspreport.rb, line 33
def source(value)
  merge(source: value.to_s)
end