SPB Git
1.3 KB · 37 lines typescript
1import type { NextConfig } from "next";23const securityHeaders = [4  { key: "X-Content-Type-Options", value: "nosniff" },5  { key: "X-Frame-Options", value: "DENY" },6  { key: "Referrer-Policy", value: "strict-origin-when-cross-origin" },7  { key: "Permissions-Policy", value: "camera=(), microphone=(), geolocation=()" },8  { key: "Strict-Transport-Security", value: "max-age=63072000; includeSubDomains" },9  {10    key: "Content-Security-Policy",11    value: [12      "default-src 'self'",13      "script-src 'self' 'unsafe-inline' 'unsafe-eval'",14      "style-src 'self' 'unsafe-inline'",15      "img-src 'self' data: blob: https:",16      "font-src 'self' data:",17      "connect-src 'self'",18      "media-src 'self' blob:",19      "frame-src https://www.youtube-nocookie.com https://www.youtube.com https://player.vimeo.com",20      "worker-src 'self' blob:",21      "object-src 'none'",22      "base-uri 'self'",23      "form-action 'self'",24      "frame-ancestors 'none'",25    ].join("; "),26  },27];2829const nextConfig: NextConfig = {30  serverExternalPackages: ["pg-boss", "postgres", "@node-rs/argon2", "pdf-parse", "mammoth", "pino"],31  experimental: { serverActions: { bodySizeLimit: "50mb" } },32  async headers() {33    return [{ source: "/(.*)", headers: securityHeaders }];34  },35};36export default nextConfig;37
Files · 2c37cb5a3e2af18e5ba361996d453cab97da82c2
Menu

Theme