Repository navigation
Expand file tree
/
Copy pathcache-peer-fill.toml
More file actions
68 lines (57 loc) · 1.64 KB
/
Copy pathcache-peer-fill.toml
File metadata and controls
68 lines (57 loc) · 1.64 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
# Loopback demonstration only. Peers must serve the same public Host/content.
# Do not use custom-header variants or untrusted plaintext peer networks; see
# docs/guides/cache-peer-fill.md for the current integrity limitations.
[server]
listen = ["127.0.0.1:8080"]
default_vhost = "cache-peer.example.test"
[logging]
level = "info"
format = "json"
target = "stderr"
[[vhosts]]
name = "cache-peer.example.test"
hosts = ["cache-peer.example.test"]
[vhosts.cache]
enabled = true
status_header = "X-Cache-Status"
status_reason_header = "X-Cache-Reason"
allow_client_cache_refresh = false
key_namespace = "peer-fill-example-v1"
key_parts = ["method", "host", "path", "query"]
default_status_ttl_secs = 300
content_types = ["image/*", "text/css", "application/javascript", "font/*"]
image_extensions = ["avif", "css", "gif", "ico", "jpg", "js", "png", "svg", "webp", "woff2"]
max_object_bytes = "32MiB"
[vhosts.cache.memory]
enabled = true
max_size_bytes = "512MiB"
[vhosts.cache.disk]
enabled = true
backend = "storage-bin"
path = "cache/peer-fill"
max_size_bytes = "20GiB"
[vhosts.cache.disk.storage_bin]
bin_size_bytes = "256MiB"
preallocate = false
max_open_bins = 16
[vhosts.cache.lock]
enabled = true
age_timeout_secs = 30
wait_timeout_secs = 30
[vhosts.cache.peer_fill]
enabled = true
connect_timeout_secs = 2
read_timeout_secs = 10
max_object_bytes = "32MiB"
max_concurrent_requests = 64
allow_insecure_http = false
fail_open = true
[[vhosts.cache.peer_fill.peers]]
name = "cache-a"
base_url = "http://127.0.0.1:18081"
[[vhosts.cache.peer_fill.peers]]
name = "cache-b"
base_url = "http://[::1]:18082"
[vhosts.proxy]
upstreams = ["127.0.0.1:3000"]
upstream_tls = false