-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy pathnetlify.toml
More file actions
46 lines (37 loc) · 1011 Bytes
/
netlify.toml
File metadata and controls
46 lines (37 loc) · 1011 Bytes
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
[build]
publish = ".next"
command = "npm run build"
[build.environment]
NODE_VERSION = "20"
# Redirect rules for Next.js
[[redirects]]
from = "/_next/static/*"
to = "/static/:splat"
status = 200
# Handle client-side routing
[[redirects]]
from = "/*"
to = "/404.html"
status = 404
# Environment variables for different deploy contexts
[context.production.environment]
NEXT_PUBLIC_SITE_URL = "https://xarray.dev"
[context.deploy-preview.environment]
NEXT_PUBLIC_SITE_URL = "$DEPLOY_PRIME_URL"
[context.branch-deploy.environment]
NEXT_PUBLIC_SITE_URL = "$DEPLOY_PRIME_URL"
# Headers for security
[[headers]]
for = "/*"
[headers.values]
X-Content-Type-Options = "nosniff"
Referrer-Policy = "strict-origin-when-cross-origin"
# Cache static assets
[[headers]]
for = "/static/*"
[headers.values]
Cache-Control = "public, max-age=31536000, immutable"
[[headers]]
for = "/_next/static/*"
[headers.values]
Cache-Control = "public, max-age=31536000, immutable"