Back to Free Tools
OWASP Security Headers
Security Headers Config Builder
Configure all 7 OWASP HTTP security headers and export production-ready configs for Next.js, Vercel, Cloudflare, or Nginx.
Header Policy Controls
// next.config.ts
import type { NextConfig } from 'next';
const nextConfig: NextConfig = {
poweredByHeader: false,
async headers() {
return [
{
source: '/(.*)',
headers: [
{ key: 'Strict-Transport-Security', value: "max-age=31536000; includeSubDomains" },
{ key: 'Content-Security-Policy', value: "default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src 'self' data: https:; font-src 'self' data:; connect-src 'self' https:; frame-ancestors 'none'; object-src 'none'; base-uri 'self'; upgrade-insecure-requests" },
{ key: 'X-Frame-Options', value: "DENY" },
{ key: 'X-Content-Type-Options', value: "nosniff" },
{ key: 'Referrer-Policy', value: "strict-origin-when-cross-origin" },
{ key: 'Permissions-Policy', value: "camera=(), microphone=(), geolocation=(), payment=(), usb=()" },
{ key: 'Cross-Origin-Opener-Policy', value: "same-origin" },
],
},
];
},
};
export default nextConfig;