All API tools

DevOps & Config

CSP Header Builder API

GET/v1/csp-builder Free tier1 credit / call

Authentication

Send your API key as a bearer token. Create one free in the dashboard.

Authorization: Bearer $TOOLSXPO_KEY

Parameters

Passed as query-string parameters. Example values shown.

NameExample
defaultSrc'self'
scriptSrc'self'
styleSrc'self'
imgSrc'self'
connectSrc'self'
fontSrc'self'
frameAncestors'none'
baseUri'self'
formAction'self'
upgradeInsecurefalse
blockMixedfalse

Example request

curl "https://api.toolsxpo.com/v1/csp-builder?defaultSrc='self'&scriptSrc='self'&styleSrc='self'&imgSrc='self'&connectSrc='self'&fontSrc='self'&frameAncestors='none'&baseUri='self'&formAction='self'&upgradeInsecure=false&blockMixed=false" \
  -H "Authorization: Bearer $TOOLSXPO_KEY"

Response

A standard JSON envelope: { ok, data, meta }. The result is in data (text); meta.credits reports what the call cost.