headers object in website_config.
Add headers
Use canonical header names in an inline object of string literals.website_config
Allowed headers
headers accepts these response headers:
Content-Security-PolicyContent-Security-Policy-Report-OnlyCross-Origin-Embedder-PolicyCross-Origin-Opener-PolicyCross-Origin-Resource-PolicyNELOrigin-Agent-ClusterPermissions-PolicyReferrer-PolicyReport-ToReporting-EndpointsStrict-Transport-SecurityX-Content-Type-OptionsX-DNS-Prefetch-ControlX-Frame-OptionsX-Permitted-Cross-Domain-PoliciesX-XSS-Protection
Location, Set-Cookie, Content-Type, Content-Length, Content-Encoding, Cache-Control, and Vary.
Platform defaults
Website responses include these defaults without configuration:
Custom domains omit
includeSubDomains because their owners may host unrelated subdomains elsewhere. Set your own allowlisted Strict-Transport-Security value when you intentionally want a different policy.
Validation
The config must remain statically extractable. Use a direct default export, an inlineheaders object, direct property names, and string literal values. Variables, function calls, spreads, computed keys, empty values, and control characters fail head/check and publishing.
Test restrictive policies on the draft hostname before publishing. A Content Security Policy, frame policy, or browser capability policy can block resources and integrations your site uses.