Build robust Content-Security-Policy (CSP) headers with customizable script-src, style-src, frame-ancestors, and connect-src directives.