TypeScript 97.5%
SQL 1.4%
Python 0.8%
1import type { NextConfig } from "next";23const apiUrl = process.env.API_URL ?? "http://127.0.0.1:8221";45const nextConfig: NextConfig = {6 reactStrictMode: true,7 agentRules: false,8 poweredByHeader: false,9 transpilePackages: ["@fetcha/core", "@fetcha/db", "@fetcha/email", "@fetcha/providers"],10 serverExternalPackages: ["pg", "undici", "resend"],11 // Browser renders + captcha solving can legitimately take 60–120 s: the default 30 s rewrite proxy12 // timeout would answer 500 before the API replies.13 experimental: { proxyTimeout: 180_000 },14 async rewrites() {15 // Public API is served on the same domain under /v1/* and forwarded to the Fastify service.16 return [17 { source: "/v1/:path*", destination: `${apiUrl}/v1/:path*` },18 { source: "/api/health", destination: `${apiUrl}/health` },19 { source: "/api/ready", destination: `${apiUrl}/ready` },20 ];21 },22 async headers() {23 return [24 {25 source: "/(.*)",26 headers: [27 { key: "X-Content-Type-Options", value: "nosniff" },28 { key: "X-Frame-Options", value: "DENY" },29 { key: "Referrer-Policy", value: "strict-origin-when-cross-origin" },30 { key: "Permissions-Policy", value: "camera=(), microphone=(), geolocation=()" },31 ],32 },33 ];34 },35};3637export default nextConfig;38