APITools
Analyze a CSP policy
Reviews a Content-Security-Policy header value and reports what each directive does and where the policy is weak, for example an unsafe keyword or an overly broad source. Requires no authentication.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
csp*string
The Content-Security-Policy header value to review.
Length
1 <= lengthlanguage?string
Language for the text in the result.
Default
"en"Response Body
application/json
curl -X POST "https://api-next.centralcsp.com/v1/tools/csp/analyze" \ -H "Content-Type: application/json" \ -d '{ "csp": "default-src \'self\'; script-src \'self\' https://js.stripe.com" }'{}