Skip to content

Commit

Permalink
chore: update comments for ClientIP function
Browse files Browse the repository at this point in the history
  • Loading branch information
Aliothmoon committed Dec 25, 2024
1 parent 4cc53fe commit aa86673
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/app/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -1305,7 +1305,7 @@ func (ctx *RequestContext) Body() ([]byte, error) {
return ctx.Request.BodyE()
}

// ClientIP tries to parse the headers in [X-Real-Ip, X-Forwarded-For].
// ClientIP attempts to parse the headers in the order of [X-Forwarded-For, X-Real-IP].
// It calls RemoteIP() under the hood. If it cannot satisfy the requirements,
// use engine.SetClientIPFunc to inject your own implementation.
func (ctx *RequestContext) ClientIP() string {
Expand Down

0 comments on commit aa86673

Please sign in to comment.