Closed youngzil closed 1 week ago
The changes made to the AbstractOpenApiService
class in the apollo-openapi
project include the addition of new import statements and the implementation of a new method, addClientIP
. This method appends the client's IP address to HTTP request headers. Additionally, the execute(HttpUriRequest request)
method has been updated to invoke addClientIP
prior to executing requests, thereby integrating client IP tracking into the request lifecycle.
File | Change Summary |
---|---|
apollo-openapi/src/main/java/com/ctrip/framework/apollo/openapi/client/service/AbstractOpenApiService.java |
- Added new import statements for Foundation , HttpHeaders , and ProtocolVersion . - Implemented private void addClientIP(HttpUriRequest request) method to append client IP to headers. - Updated execute(HttpUriRequest request) to call addClientIP(request) before executing requests. |
In the code where rabbits hop,
A new method helps requests pop!
With client IPs now in tow,
Our headers dance and flow.
Hooray for changes, swift and bright,
In the code, we take delight! 🐇✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
This pull request has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 14 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!
What's the purpose of this PR
Apollo openapi calls add client real IP information
Which issue(s) this PR fixes:
Fixes #
Brief changelog
XXXXX
Follow this checklist to help us incorporate your contribution quickly and easily:
mvn clean test
to make sure this pull request doesn't break anything.CHANGES
log.Summary by CodeRabbit