-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.ts
More file actions
25 lines (22 loc) · 1 KB
/
Copy pathnext.config.ts
File metadata and controls
25 lines (22 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import type { NextConfig } from 'next';
import { resolveDefaultOrigin } from './lib/seo/env';
/**
* Environment-scoped origin.
*
* `next.config.ts` is evaluated when the Next.js server boots (dev, build, and
* `next start`). If no `SITE_ORIGIN` was provided for this process, we bind the
* default origin for the current environment here. That guarantees a preview or
* staging `next start` defaults to a non-production origin and can never fall
* back to production's canonical host.
*
* An explicit `SITE_ORIGIN=...` always wins (the `??=` leaves it untouched),
* which is what production deployments and the e2e harness rely on.
*/
process.env.SITE_ORIGIN ??= resolveDefaultOrigin();
const nextConfig: NextConfig = {
// Nothing exotic is required for the SEO patterns in this starter. Keeping
// the config minimal keeps the "what the frontend is responsible for" surface
// honest: correctness lives in the route + lib code, not in build magic.
reactStrictMode: true,
};
export default nextConfig;