lhotari opened a new pull request, #22524:
URL: https://github.com/apache/pulsar/pull/22524

   Fixes #22512
   
   ### Motivation
   
   See #22512. In some environments, there's a HTTP reverse proxy in front of 
Pulsar Proxy or Pulsar Broker and there's a desire to log the actual client IP 
addresses instead of the reverse proxy's IP address. For this purpose, it's now 
possible to configure the broker or proxy to trust the value of the 
X-Forwarded-For header.
   
   ### Modifications
   
   - Configure 
[ForwardedRequestCustomizer](https://eclipse.dev/jetty/javadoc/jetty-12/org/eclipse/jetty/server/ForwardedRequestCustomizer.html)
 for jetty 
[httpConfiguration](https://github.com/apache/pulsar/blob/20915d1c438783c05778d98a3b77ec485b79d79d/pulsar-broker/src/main/java/org/apache/pulsar/broker/web/WebService.java#L105)
 to handle the `X-Forwarded-For` header when 
`httpServerTrustXForwardedFor=true`.
   
   ### Documentation
   
   <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
   
   - [ ] `doc` <!-- Your PR contains doc changes. -->
   - [ ] `doc-required` <!-- Your PR changes impact docs and you will update 
later -->
   - [x] `doc-not-needed` <!-- Your PR changes do not impact docs -->
   - [ ] `doc-complete` <!-- Docs have been already added -->


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to