This repository was archived by the owner on May 21, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -190,6 +190,8 @@ func (r *RequestAccessor) EventToRequest(req events.APIGatewayProxyRequest) (*ht
190190 return nil , err
191191 }
192192
193+ httpRequest .RemoteAddr = req .RequestContext .Identity .SourceIP
194+
193195 if req .MultiValueHeaders != nil {
194196 for k , values := range req .MultiValueHeaders {
195197 for _ , value := range values {
Original file line number Diff line number Diff line change @@ -123,7 +123,7 @@ func (r *RequestAccessorV2) EventToRequest(req events.APIGatewayV2HTTPRequest) (
123123
124124 path := req .RawPath
125125
126- //if RawPath empty is, populate from request context
126+ // if RawPath empty is, populate from request context
127127 if len (path ) == 0 {
128128 path = req .RequestContext .HTTP .Path
129129 }
@@ -164,6 +164,8 @@ func (r *RequestAccessorV2) EventToRequest(req events.APIGatewayV2HTTPRequest) (
164164 return nil , err
165165 }
166166
167+ httpRequest .RemoteAddr = req .RequestContext .HTTP .SourceIP
168+
167169 for _ , cookie := range req .Cookies {
168170 httpRequest .Header .Add ("Cookie" , cookie )
169171 }
You can’t perform that action at this time.
0 commit comments