-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnetlify.toml
More file actions
58 lines (46 loc) · 1.3 KB
/
netlify.toml
File metadata and controls
58 lines (46 loc) · 1.3 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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# Netlify Configuration for XAH Payroll Frontend
# Deployment settings for GOOD MONEY COLLECTIVE team
[build]
# Base directory for build
base = "frontend"
# Build command
command = "npm run build"
# Publish directory (relative to base)
publish = "dist"
[build.environment]
# Node.js version
NODE_VERSION = "18"
# NPM version
NPM_VERSION = "9"
# Redirect rules for React Router (SPA)
[[redirects]]
from = "/*"
to = "/index.html"
status = 200
force = false
# Custom headers for security
[[headers]]
for = "/*"
[headers.values]
X-Frame-Options = "DENY"
X-Content-Type-Options = "nosniff"
X-XSS-Protection = "1; mode=block"
Referrer-Policy = "strict-origin-when-cross-origin"
Permissions-Policy = "geolocation=(), microphone=(), camera=()"
# Cache static assets with version checking
# Changed from "immutable" to allow cache revalidation on new deployments
[[headers]]
for = "/assets/*"
[headers.values]
Cache-Control = "public, max-age=31536000"
# Production context (main branch)
[context.production]
command = "npm run build"
[context.production.environment]
NODE_ENV = "production"
# Deploy preview context (pull requests)
[context.deploy-preview]
command = "npm run build"
# Branch deploy context
[context.branch-deploy]
command = "npm run build"