Batch commit of the pending working tree on security/audit-fixes-2026-07. Major areas: - Outbound webhooks / Zapier: schema + signed delivery with retries, public v1 API (REST-hook subscribe/unsubscribe), settings UI, cron drain. - Deploy hardening: email via SMTP2GO (Resend fully removed), verified DB TLS (DATABASE_SSL=require + DATABASE_CA), storage fails loud in production when Spaces is unconfigured instead of silently using ephemeral disk. - Integrations & features (concurrent work): accounting (QuickBooks/Xero), e-signature (DocuSign/Dropbox Sign), PayPal, geocoding/maps, onboarding, expanded legal pages. - DB migrations 0006–0009. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
35 lines
1.3 KiB
TypeScript
35 lines
1.3 KiB
TypeScript
import type { NextConfig } from "next";
|
|
|
|
// NOTE: The Content-Security-Policy is set per-request in `proxy.ts` (Next
|
|
// middleware) so `script-src` can carry a per-request nonce instead of
|
|
// 'unsafe-inline'. A static header here cannot carry a per-request nonce and
|
|
// would conflict with the middleware, so it is intentionally omitted below.
|
|
const nextConfig: NextConfig = {
|
|
// Emit a self-contained server bundle at .next/standalone so the Docker
|
|
// image (deployed to DigitalOcean App Platform) ships only the files needed to run `node server.js`.
|
|
output: "standalone",
|
|
|
|
// Strict security headers applied to every route.
|
|
async headers() {
|
|
return [
|
|
{
|
|
source: "/(.*)",
|
|
headers: [
|
|
{ key: "X-Content-Type-Options", value: "nosniff" },
|
|
{ key: "X-Frame-Options", value: "DENY" },
|
|
// no-referrer prevents the tenant-portal token (carried in the URL)
|
|
// from leaking to third parties via the Referer header.
|
|
{ key: "Referrer-Policy", value: "no-referrer" },
|
|
{
|
|
key: "Strict-Transport-Security",
|
|
value: "max-age=63072000; includeSubDomains; preload",
|
|
},
|
|
{ key: "X-DNS-Prefetch-Control", value: "off" },
|
|
],
|
|
},
|
|
];
|
|
},
|
|
};
|
|
|
|
export default nextConfig;
|