-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathwrangler.safe-example.jsonc
More file actions
98 lines (90 loc) · 1.94 KB
/
Copy pathwrangler.safe-example.jsonc
File metadata and controls
98 lines (90 loc) · 1.94 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
/**
* Safe Wrangler Configuration Template
* For more details: https://developers.cloudflare.com/workers/wrangler/configuration/
*/
{
"$schema": "node_modules/wrangler/config-schema.json",
"name": "blog",
"main": "./dist/_worker.js/index.js",
"compatibility_date": "2025-03-20",
"compatibility_flags": ["nodejs_compat"],
"assets": {
"binding": "ASSETS",
"directory": "./dist"
},
"observability": {
"enabled": true
},
/**
* Routes - Safe to commit (public information)
*/
"routes": [
{
"pattern": "blog.ngockhoi96.dev",
"custom_domain": true
}
],
/**
* KV Namespaces - IDs are safe to commit (they're not secrets)
* These are like database table names, not credentials
*/
"kv_namespaces": [
{
"binding": "MY_TEST_KV",
"id": "dbc60903f1124f808ff7426fc18dc2fc"
}
],
/**
* R2 Buckets - Bucket names are safe to commit
*/
"r2_buckets": [
{
"binding": "BLOG_IMAGES",
"bucket_name": "blog-images"
}
],
/**
* Images binding - Safe to commit
*/
"images": {
"binding": "IMAGES"
},
/**
* Environment Variables - ONLY NON-SENSITIVE DATA
* Use these for:
* - Public URLs
* - Timeouts and limits
* - Public configuration
* - Feature flags
*/
"vars": {
"VIEW_TTL_SECONDS": "86400",
"VIEW_DELAY_MS": "10000",
"R2_PUBLIC_URL": "https://assets.ngockhoi96.dev",
"R2_BUCKET_NAME": "blog-images",
"API_VERSION": "v1",
"ENABLE_ANALYTICS": "true",
"MAX_UPLOAD_SIZE_MB": "50"
}
/**
* ⚠️ SECRETS MANAGEMENT:
*
* For sensitive data, use Wrangler secrets (NOT in this file):
*
* Development:
* - Create .dev.vars file (git-ignored)
* - Add: DATABASE_URL=your-dev-url
*
* Production:
* - wrangler secret put DATABASE_URL
* - wrangler secret put JWT_SECRET
* - wrangler secret put EXTERNAL_API_KEY
*
* Never put these in wrangler.jsonc:
* - API keys/tokens
* - Database URLs with credentials
* - JWT secrets
* - Webhook secrets
* - Encryption keys
*/
}