Skip to content

Commit 01b96bc

Browse files
authored
Merge pull request #189 from b0ch3nski/http-request-ip
jshttp: populate RemoteAddr in http.Request
2 parents 7960d47 + c51618c commit 01b96bc

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

internal/jshttp/request.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ func ToRequest(req js.Value) (*http.Request, error) {
4040
ContentLength: contentLength,
4141
TransferEncoding: strings.Split(header.Get("Transfer-Encoding"), ","),
4242
Host: header.Get("Host"),
43+
RemoteAddr: header.Get("Cf-Connecting-Ip"),
4344
}, nil
4445
}
4546

0 commit comments

Comments
 (0)