Overview
The API headers scanner makes an HTTP request to your API and checks the response headers against security best practices. It runs onscan api targets.
Usage
Headers checked
Header recommendations
Strict-Transport-Security (HSTS)
Content-Security-Policy
X-Content-Type-Options
X-Frame-Options
Referrer-Policy
Express.js setup (Node.js)
Usehelmet to set all security headers in one line:
FastAPI setup (Python)
CORS configuration
A wildcardAccess-Control-Allow-Origin: * allows any website to make requests to your API — including reading the response. This is only safe for public, unauthenticated data.
The API scanner only tests the response headers of the target URL. It does not attempt authentication, send a request body, or test API logic. For code-level security analysis, use
scan repo.