Skip to content
Fourohtwo

Parse a pasted Content-Security-Policy value as CSP Level 3 does

api.lookproof.dev/v1/http/csp-parse

Parse a pasted Content-Security-Policy value as CSP Level 3 does: directives and sources per policy, 'unsafe-inline' and 'unsafe-eval', wildcard and scheme-only script or plugin sources, missing default-src, object-src and base-uri, and report-only mode. Offline. Use when an agent writes or reviews a CSP before it is deployed. Input: {"header": "default-src 'self'; script-src 'self'"}.

BaseAnswering
POSThttps://api.lookproof.dev/v1/http/csp-parse

Uptime100% of 1 check in 30 days

30 days agoToday

Try it

Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.

The response shows up here.

Call it from an agent

import { createPayer } from "fourohtwo";

// One agent key pays USDC on Base or USDG on Robinhood Chain,
// inside the spending rules you set on Fourohtwo.
const pay = createPayer({ privateKey: process.env.AGENT_KEY });
const res = await pay("https://api.lookproof.dev/v1/http/csp-parse", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"header":"Content-Security-Policy: default-src 'self'; script-src 'self' 'unsafe-inline' https://cdn.example.com; object-src 'none'; base-uri 'self'"}),
});
console.log(await res.json());

Example input

{
  "header": "Content-Security-Policy: default-src 'self'; script-src 'self' 'unsafe-inline' https://cdn.example.com; object-src 'none'; base-uri 'self'"
}

More from Lookproof