-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwrangler.toml
More file actions
38 lines (31 loc) · 961 Bytes
/
wrangler.toml
File metadata and controls
38 lines (31 loc) · 961 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
# Cloudflare Pages configuration
name = "nepali-textbox-demo"
compatibility_date = "2024-01-01"
[env.production]
# Production environment configuration
# Build configuration
build = { command = "npm run build", cwd = ".", watch_dir = "src" }
# Output directory after build
pages_build_output_dir = "dist"
# Custom headers for static assets
[[env.production.headers]]
for = "/*"
[env.production.headers.values]
X-Frame-Options = "DENY"
X-Content-Type-Options = "nosniff"
Referrer-Policy = "strict-origin-when-cross-origin"
# Cache static assets
[[env.production.headers]]
for = "/assets/*"
[env.production.headers.values]
Cache-Control = "public, max-age=31536000, immutable"
# HTML files - short cache for updates
[[env.production.headers]]
for = "*.html"
[env.production.headers.values]
Cache-Control = "public, max-age=0, must-revalidate"
# Support for client-side routing (SPA)
[[env.production.redirects]]
from = "/*"
to = "/index.html"
status = 200