Skip to content

Commit bc00103

Browse files
fmountclaude
andcommitted
Fix client IP logging in Horizon VirtualHost
The VirtualHost CustomLog directive was using a custom format that only logged forwarded requests, missing direct requests entirely. Replace with SetEnvIf and dual CustomLog lines to match the nova-operator pattern, logging both direct and forwarded requests with the correct client IP. Closes: OSPRH-32110 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Francesco Pantano <fpantano@redhat.com>
1 parent 692a73e commit bc00103

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

templates/horizon/config/httpd.conf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@ LogLevel debug
5151
## Logging
5252
ErrorLog {{ .LogFile }}
5353
ServerSignature Off
54-
CustomLog {{ .LogFile }} "%a %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" env=forwarded
54+
SetEnvIf X-Forwarded-For "^.*\..*\..*\..*" forwarded
55+
CustomLog {{ .LogFile }} combined env=!forwarded
56+
CustomLog {{ .LogFile }} proxy env=forwarded
5557

5658
## RedirectMatch rules
5759
RedirectMatch permanent ^/$ "{{ .horizonEndpoint }}/dashboard"

0 commit comments

Comments
 (0)