-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathnetlify.toml
More file actions
51 lines (43 loc) · 1.21 KB
/
netlify.toml
File metadata and controls
51 lines (43 loc) · 1.21 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
[build]
command = "cargo run -- -i test_input -o dist"
publish = "dist"
[build.environment]
RUST_VERSION = "1.70.0"
# Redirect rules for better navigation
[[redirects]]
from = "/*"
to = "/404.html"
status = 404
# Cache optimization for static assets
[[headers]]
for = "/css/*"
[headers.values]
Cache-Control = "public, max-age=31536000, immutable"
Vary = "Accept-Encoding"
[[headers]]
for = "/js/*"
[headers.values]
Cache-Control = "public, max-age=31536000, immutable"
Vary = "Accept-Encoding"
[[headers]]
for = "/img/*"
[headers.values]
Cache-Control = "public, max-age=31536000, immutable"
# HTML pages - always revalidate for fresh content
[[headers]]
for = "*.html"
[headers.values]
Cache-Control = "public, max-age=0, must-revalidate"
# Security headers for all pages
[[headers]]
for = "/*"
[headers.values]
X-Frame-Options = "DENY"
X-XSS-Protection = "1; mode=block"
X-Content-Type-Options = "nosniff"
Referrer-Policy = "strict-origin-when-cross-origin"
Permissions-Policy = "camera=(), microphone=(), geolocation=()"
# Enable Netlify Functions (optional)
[functions]
directory = "netlify/functions"
included_files = ["netlify/functions/**"]