-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnetlify.toml
More file actions
50 lines (41 loc) · 1.1 KB
/
netlify.toml
File metadata and controls
50 lines (41 loc) · 1.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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
[build]
command = "npm run build"
publish = "dist"
# Prevent caching of HTML files to ensure users get latest version
[[headers]]
for = "/*.html"
[headers.values]
Cache-Control = "no-cache, no-store, must-revalidate"
[[headers]]
for = "/"
[headers.values]
Cache-Control = "no-cache, no-store, must-revalidate"
# Optimize asset caching - critical for performance
[[headers]]
for = "/assets/*"
[headers.values]
Cache-Control = "public, max-age=31536000, immutable"
[[headers]]
for = "/env/*"
[headers.values]
Cache-Control = "public, max-age=31536000, immutable"
[[headers]]
for = "/logos/*"
[headers.values]
Cache-Control = "public, max-age=31536000, immutable"
# Enable security headers (Netlify handles compression automatically)
[[headers]]
for = "/*"
[headers.values]
X-Content-Type-Options = "nosniff"
X-Frame-Options = "DENY"
X-XSS-Protection = "1; mode=block"
# SPA routing fallback
[[redirects]]
from = "/*"
to = "/index.html"
status = 200
# Optimize build settings
[build.environment]
NODE_VERSION = "18"
NPM_FLAGS = "--legacy-peer-deps"