Documentation
¶
Overview ¶
Package cspreport provides facilities for logging CSP and HPKP violation reports.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Handler http.Handler
HTTP handler which logs CSP and HPKP reports.
View Source
var _, Log = xlog.New("web.cspreport")
Logger which generates CSP and HPKP reports.
Functions ¶
This section is empty.
Types ¶
type CSPReport ¶
type CSPReport struct { Body struct { BlockedURI string `json:"blocked-uri"` DocumentURI string `json:"document-uri"` EffectiveDirective string `json:"effective-directive"` OriginalPolicy string `json:"original-policy"` Referrer string `json:"referrer"` StatusCode int `json:"status-code"` ViolatedDirective string `json:"violated-directive"` SourceFile string `json:"source-file"` LineNumber int `json:"line-number"` ColumnNumber int `json:"column-number"` } `json:"csp-report"` }
CSP report structure.
type PKPReport ¶
type PKPReport struct { DateTime time.Time `json:"date-time"` Hostname string `json:"hostname"` Port int `json:"port"` EffectiveExpirationDate time.Time `json:"effective-expiration-date"` IncludeSubdomains bool `json:"include-subdomains"` KnownPins []string `json:"known-pins"` ServedCertificateChain []string `json:"served-certificate-chain"` ValidatedCertificateChain []string `json:"validated-certificate-chain"` }
HPKP report structure.
Click to show internal directories.
Click to hide internal directories.