Repository navigation
Expand file tree
/
Copy pathwrangler.toml
More file actions
47 lines (40 loc) · 1.72 KB
/
Copy pathwrangler.toml
File metadata and controls
47 lines (40 loc) · 1.72 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
# Cloudflare Worker config for the rpg-maker-clone CORS proxy.
# Deploy with: cd scripts/cors-proxy && npx wrangler deploy
# See ../../docs/cors-proxy.md for the full walkthrough.
name = "rpg-maker-cors-proxy"
main = "worker.js"
compatibility_date = "2025-01-01"
# Optional access controls so this isn't an open proxy. All unset => open.
# Uncomment and edit to enable. See ../../docs/cors-proxy.md for the details.
[vars]
# Which target hosts may be fetched (leading dot matches subdomains):
# ALLOWED_HOSTS = ".github.com,codeload.github.com,objects.githubusercontent.com"
# Which web-page origins may call the proxy (exact scheme+host):
# ALLOWED_ORIGINS = "https://<owner>.github.io,http://localhost:8000"
#
# The shared secret (AUTH_KEY) is the real "only me" lock. Do NOT put it here in
# plaintext — set it as an encrypted secret instead:
# npx wrangler secret put AUTH_KEY
# then use a query-style prefix that includes it: https://<worker>/?key=SECRET&url=
# Tune freshness/size in [vars] alongside the access-control vars above:
CACHE_TTL_SECONDS = "86400" # how long a cached entry stays fresh (default)
CACHE_MAX_BYTES = "268435456" # skip caching (not proxying) anything bigger
# Optional R2 cache so a repeat load (by anyone) skips the upstream fetch.
# Unbound => no caching, the Worker behaves exactly as before. Create the
# bucket once, then uncomment:
# npx wrangler r2 bucket create rpg-maker-cors-proxy-cache
[[r2_buckets]]
binding = "ARCHIVE_CACHE"
bucket_name = "rpg-maker-cors-proxy-cache"
[observability]
enabled = false
head_sampling_rate = 1
[observability.logs]
enabled = true
head_sampling_rate = 1
persist = true
invocation_logs = true
[observability.traces]
enabled = true
persist = true
head_sampling_rate = 1