Repository Public
1import type { NextConfig } from "next";23const csp = [4 "default-src 'self'",5 "script-src 'self' 'unsafe-inline'",6 "style-src 'self' 'unsafe-inline'",7 "img-src 'self' data: blob:",8 "media-src 'self' blob:",9 "font-src 'self'",10 "connect-src 'self'",11 "frame-ancestors 'none'",12 "base-uri 'self'",13 "form-action 'self'",14 "object-src 'none'",15].join("; ");1617const config: NextConfig = {18 poweredByHeader: false,19 serverExternalPackages: ["bullmq", "ioredis", "postgres"],20 experimental: { serverActions: { bodySizeLimit: "2mb" } },21 async headers() {22 return [23 {24 source: "/:path*",25 headers: [26 { key: "Content-Security-Policy", value: csp },27 { key: "X-Content-Type-Options", value: "nosniff" },28 { key: "Referrer-Policy", value: "strict-origin-when-cross-origin" },29 { key: "X-Frame-Options", value: "DENY" },30 { key: "Permissions-Policy", value: "camera=(), microphone=(), geolocation=(), interest-cohort=()" },31 { key: "Strict-Transport-Security", value: "max-age=31536000; includeSubDomains" },32 ],33 },34 ];35 },36};37export default config;38