-
Notifications
You must be signed in to change notification settings - Fork 623
Rename useForwardedHeaders to useRemoteIpOptions #33202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: integration
Are you sure you want to change the base?
Rename useForwardedHeaders to useRemoteIpOptions #33202
Conversation
|
!build (view Open Liberty Personal Build - ❌ completed with errors/failures.) Note: Target locations of links might be accessible only to IBM employees. |
Code analysis and actionsDO NOT DELETE THIS COMMENT.
|
629d17b to
7d35080
Compare
| if (Objects.nonNull(serviceContext)) { | ||
|
|
||
| hostAddress = serviceContext.useForwardedHeadersInAccessLog() ? serviceContext.getForwardedRemoteHost() : null; | ||
| hostAddress = serviceContext.useRemoteIpOptionsInAccessLog() ? serviceContext.getForwardedRemoteHost() : null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm unsure that this is more descriptive since the object that will be used is getForwardedRemoteHost() . While it is true that the remote host is calculated based on remote IP options, it itself is a forwarded (or x-forwarded) type header. So as it stands it would read : "use forwarded header or host address for the access log remote host" . We don't configure a remoteIP option that gives us a host, rather those options help determine if we consider the forwarded headers. There is one singular option for the access log to consider these headers, which is what this maps to, so I'd lean towards leaving at least this one as is or perhaps something like hasRemoteIpAccessLogEnabled/ isRemoteIpAccessLogEnabled / hasRemoteIpAccessLogOption
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or we could simply use the same name as the actual remote IP option for it: useRemoteIpInAccessLog . The more I think about it, the more I'd lean towards just using the same name as the property itself for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, it's better for the public config to match. I've fixed it.
...com.ibm.ws.transport.http/src/com/ibm/ws/http/channel/internal/values/AccessLogRemoteIP.java
Outdated
Show resolved
Hide resolved
....ws.transport.http/src/com/ibm/ws/http/channel/internal/values/AccessLogRequestProtocol.java
Outdated
Show resolved
Hide resolved
|
!build (view Open Liberty Personal Build - ❌ completed with errors/failures.) Note: Target locations of links might be accessible only to IBM employees. |
Code analysis and actionsDO NOT DELETE THIS COMMENT.
|
release buglabel if applicable: https://github.com/OpenLiberty/open-liberty/wiki/Open-Liberty-Conventions).fixes #32407
This does change an SPI class, so further review is needed.