fix(proxy): use a valid local syslog tag

This commit is contained in:
2026-10-14 13:04:13 +08:00
parent c7b260adc2
commit f269a39bbe
2 changed files with 3 additions and 1 deletions
+2
View File
@@ -881,6 +881,8 @@ def test_proxy_is_separate_from_private_execution_control():
# records on the local namespace socket and restrict their fields to counters.
destination, format_name = re.findall(r"^\s+access_log (\S+) (\w+);$", contents, re.M)[0]
assert destination.startswith("syslog:server=unix:/")
tag = next(part[4:] for part in destination.split(",") if part.startswith("tag="))
assert re.fullmatch(r"[A-Za-z0-9_]+", tag)
assert format_name == "bounded" and "/dev/stdout" not in contents
log_fields = re.findall(r"^\s+log_format bounded '([^']+)';$", contents, re.M)[0]
assert log_fields.split() == [
+1 -1
View File
@@ -87,7 +87,7 @@ http {
}
default_type application/octet-stream;
log_format bounded '$request_method $status $body_bytes_sent $request_time';
access_log syslog:server=unix:/dev/log,tag=kf-proxy,nohostname,severity=info bounded;
access_log syslog:server=unix:/dev/log,tag=kf_proxy,nohostname,severity=info bounded;
server_tokens off;
limit_conn_zone $binary_remote_addr zone=per_client:64k;
limit_conn_zone $server_name zone=per_site:64k;