-
-
Notifications
You must be signed in to change notification settings - Fork 152
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
feat: add request remote address to context #447
Conversation
WalkthroughThe recent changes introduce a new method Changes
Assessment against linked issues
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? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #447 +/- ##
=======================================
Coverage 92.77% 92.77%
=======================================
Files 21 21
Lines 3571 3571
=======================================
Hits 3313 3313
Misses 220 220
Partials 38 38 ☔ View full report in Codecov by Sentry. |
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.
Actionable comments posted: 0
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (10)
- adapters/humabunrouter/humabunrouter.go (2 hunks)
- adapters/humachi/humachi.go (1 hunks)
- adapters/humaecho/humaecho.go (1 hunks)
- adapters/humafiber/humafiber.go (1 hunks)
- adapters/humaflow/humaflow.go (1 hunks)
- adapters/humagin/humagin.go (1 hunks)
- adapters/humago/humago.go (1 hunks)
- adapters/humahttprouter/humahttprouter.go (1 hunks)
- adapters/humamux/humamux.go (1 hunks)
- api.go (1 hunks)
Additional comments not posted (11)
adapters/humamux/humamux.go (1)
46-48
: Implementation ofRemoteAddr()
correctly returns the remote address from the HTTP request.adapters/humahttprouter/humahttprouter.go (1)
48-50
: Implementation ofRemoteAddr()
correctly returns the remote address from the HTTP request.adapters/humachi/humachi.go (1)
46-48
: Implementation ofRemoteAddr()
correctly returns the remote address from the HTTP request.adapters/humagin/humagin.go (1)
45-47
: Implementation ofRemoteAddr()
correctly returns the remote address from the HTTP request.adapters/humaecho/humaecho.go (1)
45-47
: Implementation ofRemoteAddr()
correctly returns the remote address from the HTTP request.adapters/humafiber/humafiber.go (1)
46-48
: Implementation ofRemoteAddr()
correctly returns the remote address from the HTTP request.adapters/humaflow/humaflow.go (1)
44-46
: Implementation ofRemoteAddr()
correctly returns the remote address from the HTTP request.adapters/humago/humago.go (1)
46-48
: Implementation ofRemoteAddr()
correctly returns the remote address from the HTTP request.adapters/humabunrouter/humabunrouter.go (2)
48-50
: The implementation ofRemoteAddr()
inbunContext
is straightforward and correctly retrieves the remote address from the request.
138-140
: The implementation ofRemoteAddr()
inbunCompatContext
is consistent withbunContext
, correctly retrieving the remote address from the request.api.go (1)
75-77
: The addition ofRemoteAddr()
to theContext
interface aligns with the PR objectives and correctly provides a method to access the client's remote address.
Based on several user requests, this adds access to the remote address from the client request to the Huma context so you can use it in middleware and resolvers.
Fixes #445.
Summary by CodeRabbit
RemoteAddr()
method to theContext
interface, enhancing the ability to access the client's remote address.