Skip to content

Commit da592d5

Browse files
fmountclaude
andcommitted
Fix client IP logging in Neutron API VirtualHost
The VirtualHost CustomLog directive was overriding the server-level dual-log setup, causing all requests to be logged with the OpenShift router IP instead of the real client IP from X-Forwarded-For. Add SetEnvIf and dual CustomLog lines inside the VirtualHost block to match the nova-operator pattern. Closes: OSPRH-32126 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Francesco Pantano <fpantano@redhat.com>
1 parent 03235a2 commit da592d5

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

templates/neutronapi/httpd/10-neutron-httpd.conf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
## Logging
99
ErrorLog /dev/stdout
1010
ServerSignature Off
11-
CustomLog /dev/stdout combined
11+
SetEnvIf X-Forwarded-For "^.*\..*\..*\..*" forwarded
12+
CustomLog /dev/stdout combined env=!forwarded
13+
CustomLog /dev/stdout proxy env=forwarded
1214

1315
## Request header rules
1416
## as per http://httpd.apache.org/docs/2.2/mod/mod_headers.html#requestheader

0 commit comments

Comments
 (0)