This commit is contained in:
WJQSERVER 2024-10-02 21:44:33 +08:00
parent df05c6a275
commit 9f801bbac8
5 changed files with 24 additions and 12 deletions

View file

@ -4,7 +4,7 @@
https_port 443
order cache before rewrite
cache {
cache_name W-Cache
cache_name GhProxyCache
}
log {
level INFO
@ -20,7 +20,7 @@
format transform `{request>headers>X-Forwarded-For>[0]:request>remote_ip} - {user_id} [{ts}] "{request>method} {request>uri} {request>proto}" {status} {size} "{request>headers>Referer>[0]}" "{request>headers>User-Agent>[0]}"` {
time_format "02/Jan/2006:15:04:05 -0700"
}
output file /data/caddy/log/{args.0}/access.log {
output file /data/caddy/log/{args[0]}/access.log {
roll_size 5MB
roll_keep 10
roll_keep_for 24h
@ -48,8 +48,8 @@
(cache) {
cache {
allowed_http_verbs GET
stale {args.0}
ttl {args.1}
stale {args[0]}
ttl {args[1]}
}
}
@ -68,7 +68,7 @@
(rate_limit) {
route /* {
rate_limit {remote.ip} {args.0}r/m 10000 429
rate_limit {remote.ip} {args[0]}r/m 10000 429
}
}