Skip to content

Commit cc425c1

Browse files
fmountclaude
andcommitted
Fix client IP logging in Keystone 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-32109 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Francesco Pantano <fpantano@redhat.com>
1 parent 08378e9 commit cc425c1

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

templates/swiftproxy/config/httpd.conf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ TimeOut {{ .APITimeout }}
3232
## Logging
3333
ErrorLog /dev/stdout
3434
ServerSignature Off
35-
CustomLog /dev/stdout combined
35+
SetEnvIf X-Forwarded-For "^.*\..*\..*\..*" forwarded
36+
CustomLog /dev/stdout combined env=!forwarded
37+
CustomLog /dev/stdout proxy env=forwarded
3638

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

0 commit comments

Comments
 (0)