-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathconfig.example.yaml
More file actions
133 lines (133 loc) · 3.52 KB
/
config.example.yaml
File metadata and controls
133 lines (133 loc) · 3.52 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
strict: true
logger:
level: info
caller: true
traceid: true
nopid: true
max_size: 10 # is the maximum size in megabytes of the log file before it gets rotated.
max_backups: 10
max_age: 1 # is the maximum number of days to retain old log files
compress: false # should be compressed using gzip.
path: /var/log/tavern/tavern.log # path to the log file, if not set, logs to stdout
server:
addr: ":8080"
read_timeout: 60s
write_timeout: 60s
idle_timeout: 90s
read_header_timeout: 30s
max_header_bytes: 1048576 # 1MB
pprof:
username: "admin"
password: "password"
middleware:
- name: recovery
options:
fail_count_threshold: 20
fail_window: 60
- name: rewrite
options:
request_headers_rewrite:
response_headers_rewrite:
set:
X-Frame-Options: "DENY"
X-Content-Type-Options: "nosniff"
Referrer-Policy: "no-referrer"
add:
X-XSS-Protection: "1; mode=block"
remove:
- "Server"
- name: multirange
options:
merge: false
- name: caching
options:
fuzzy_refresh: true
fuzzy_refresh_rate: 0.1
collapsed_request: true
collapsed_request_wait_timeout: 100ms
include_query_in_cache_key: true
fill_range_percent: 100
object_pool_enabled: true
object_pool_size: 20000
async_flush_chunk: true
vary_limit: 100
vary_ignore_key:
- "Cookie"
- "Access-Control-Request-Headers"
- "Access-Control-Request-Method"
access_log:
enabled: true
encrypt:
enabled: false
secret: "123"
path: /var/log/tavern/access.log
local_api_allow_hosts:
- "localhost"
- "127.1"
- "127.0.0.1"
plugin:
- name: qs-plugin
options:
option1: value1
option2: 2
- name: purge
options:
threshold: 60
max_queue_size: 1000
allow_hosts:
- "127.0.0.1"
- "127.1"
- "localhost"
log_path: ./logs/purge.log
- name: verifier
options:
endpoint: https://crc-svc.omalloc.com/receive
api_key: your_api_key_here
timeout: 5
report_ratio: 100
storage:
driver: native # native, custom-driver
db_type: pebble # ready [ pebble, nutsdb ], not implements [ boltdb, badgerdb ]
db_path: .indexdb # path to the index database, for absolute path, please use /absolute/path/to/db
async_load: true
eviction_policy: fifo # fifo, lru, lfu
selection_policy: hashring # hashring, roundrobin
slice_size: 1048576 # 1MB
migration:
enabled: false # enable tiering bucket
promote:
min_hits: 10 # window hits to promote
window: 1m # 1 minute window
demote:
min_hits: 2 # window hits to demote
window: 5m # 5 minutes window
occupancy: 75 # percent useage
diraware:
enabled: true # 默认 true
store_path: /cache1/.diraware
auto_clear: true
buckets:
- path: /cache1
type: normal
max_object_limit: 10000000
db_config:
cache_size: 1024000000
mem_table_size: 256000000
bytes_per_sync: 10240000
wal_bytes_per_sync: 20480000
wal_min_sync_interval: 5
write_sync_mode: false
# - path: inmemory
# driver: memory
upstream:
balancing: wrr
address:
- http://127.0.0.1:8000
# - unix:///tmp/gw.sock
max_idle_conns: 1000
max_idle_conns_per_host: 500
max_connections_per_server: 100
insecure_skip_verify: true
resolve_addresses: false
features:
limit_rate_by_fd: true