| 1 | /** @type {import("next").NextConfig} */ |
| 2 | const nextConfig = { |
| 3 | // next.config routing surface, asserted by the smoke tests. |
| 4 | async redirects() { |
| 5 | return [{ source: "/old-home", destination: "/", permanent: true }]; |
| 6 | }, |
| 7 | async rewrites() { |
| 8 | return [{ source: "/rewritten-hello", destination: "/api/hello" }]; |
| 9 | }, |
| 10 | async headers() { |
| 11 | return [ |
| 12 | { |
| 13 | source: "/api/:path*", |
| 14 | headers: [ |
| 15 | { key: "x-fixture-config-header", value: "from-next-config" }, |
| 16 | ], |
| 17 | }, |
| 18 | ]; |
| 19 | }, |
| 20 | }; |
| 21 | |
| 22 | export default nextConfig; |