Skip to content

Commit 183a63a

Browse files
committed
Clean up init-haproxy-cfg comments
Remove stale comment referencing removed {…} block syntax and replace empty HAPROXY_AUDIT_ACCEPT value with a descriptive HAProxy comment for restrict mode.
1 parent db48295 commit 183a63a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

docker/files/s6-scripts/init-haproxy-cfg

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,8 @@ if [ "$PROXY_MODE" = "audit" ]; then
2525
echo ".*" > /etc/haproxy/rules/allowed_ips.lst
2626
else
2727
echo "Configuring restrict mode (only allowed rules)..."
28-
# Convert whitespace-separated rules to newline-separated lst files
28+
# Convert whitespace-separated rules to newline-separated lst files.
2929
# Uses tr -s to squeeze any whitespace into single newlines, then grep to remove empty lines.
30-
# Commas inside patterns (e.g. {80,8080}) are preserved.
3130
if [ -n "$ALLOWED_HTTPS_RULES" ]; then
3231
printf '%s' "$ALLOWED_HTTPS_RULES" | tr -s '[:space:]' '\n' | grep . > /etc/haproxy/rules/allowed_https.lst
3332
else
@@ -62,7 +61,7 @@ if [ "$PROXY_MODE" = "audit" ]; then
6261
HAPROXY_AUDIT_ACCEPT="tcp-request content accept if !is_dns_routed !is_ip_match"
6362
else
6463
HAPROXY_DECISION_LABEL="ALLOWED"
65-
HAPROXY_AUDIT_ACCEPT=""
64+
HAPROXY_AUDIT_ACCEPT="# restrict mode: reject unmatched IPs below"
6665
fi
6766

6867
export HAPROXY_NAMESERVERS HAPROXY_DECISION_LABEL HAPROXY_AUDIT_ACCEPT

0 commit comments

Comments
 (0)