move logging to def

This commit is contained in:
Arya 2024-04-11 13:07:47 +05:30
parent ec5472ddf8
commit eceaab85f5
Signed by: arya
GPG Key ID: 842D12BDA50DF120
1 changed files with 28 additions and 28 deletions

View File

@ -1,32 +1,4 @@
{
log {
# Anonymised IPs, User-Agents, and Cookies, also removed the URI as mentionned in the privacy policy.
# Subject to change, if we find any missing config we haven't filtered, it will be added.
output file /var/log/caddy/caddy.log
format filter {
wrap json
fields {
request>remote_ip ip_mask {
ipv4 16
ipv6 64
}
request>client_ip ip_mask {
ipv4 16
ipv6 64
}
request>headers>X-Forwarded-For ip_mask {
ipv4 16
ipv6 64
}
request>headers>Cookie cookie {
replace session REDACTED
delete secret
}
request>headers>User-Agent delete
request>uri delete
}
}
}
order rate_limit before basicauth
}
@ -76,6 +48,34 @@ log {
defer
}
log {
# Anonymised IPs, User-Agents, and Cookies, also removed the URI as mentionned in the privacy policy.
# Subject to change, if we find any missing config we haven't filtered, it will be added.
output file /var/log/caddy/caddy.log
format filter {
wrap json
fields {
request>remote_ip ip_mask {
ipv4 16
ipv6 64
}
request>client_ip ip_mask {
ipv4 16
ipv6 64
}
request>headers>X-Forwarded-For ip_mask {
ipv4 16
ipv6 64
}
request>headers>Cookie cookie {
replace session REDACTED
delete secret
}
request>headers>User-Agent delete
request>uri delete
}
}
}
import acmedns
}