Repository navigation
Expand file tree
/
Copy pathwrangler.jsonc
More file actions
52 lines (52 loc) · 2.3 KB
/
Copy pathwrangler.jsonc
File metadata and controls
52 lines (52 loc) · 2.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
{
"name": "gitfolio",
"main": "src/index.js",
// 2026-03-24+ is required for env.BROWSER.quickAction()
"compatibility_date": "2026-03-24",
// custom_domain = true makes Cloudflare create and manage the DNS record on deploy. A plain
// zone route does NOT create DNS, which is the reason a route alone leaves the host unresolvable.
"routes": [
{ "pattern": "gitfolio.cpwillis.dev", "custom_domain": true }
],
// a fork changes these, and the route above
"vars": {
"GITHUB_USER": "cpwillis",
// optional: extra repo names to leave out, comma separated. A repo whose homepage is the site
// you are looking at is hidden automatically, so this is only for the cases that cannot cover.
// "website" is cpwillis.dev itself. Its homepage points at the durable gitfolio subdomain
// rather than at cpwillis.dev, so the host rule cannot recognise it as self on cpwillis.dev.
"HIDE_REPOS": "website",
// "true"/"*" serves anyone, "false"/empty serves only GITHUB_USER, or list hostnames to allow.
"MULTI_USER_HOSTS": "gitfolio.cpwillis.dev"
},
"observability": {
"enabled": true
},
// Per-IP ceilings. The feed is the expensive path (GitHub calls), the page is cheap but worth
// capping so one client cannot spin the Worker. period must be 10 or 60.
"ratelimits": [
{ "name": "RL_FEED", "namespace_id": "1001", "simple": { "limit": 30, "period": 60 } },
{ "name": "RL_PAGE", "namespace_id": "1002", "simple": { "limit": 120, "period": 60 } }
],
// so each deploy starts from a cold data cache without editing a constant
"version_metadata": {
"binding": "CF_VERSION_METADATA"
},
// Screenshots. caches.default is per colo and evicts, so a card would lose its preview and the
// re-capture would hit the account's browser concurrency limit. Optional: without it the Worker
// falls back to the cache, which is what a fork with no bucket gets.
"r2_buckets": [
{ "binding": "SHOTS", "bucket_name": "gitfolio-shots" }
],
"browser": {
"binding": "BROWSER",
// local dev only: proxy to real Browser Rendering instead of a local stub
"remote": true
},
"assets": {
"directory": "./public",
"binding": "ASSETS",
// the Worker routes everything: an unmatched path must 404, not fall back to the page
"run_worker_first": true
}
}