Skip to content

Commit 3060487

Browse files
committed
Comment
1 parent 279a018 commit 3060487

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/request.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ class Request extends ReadableStream {
5050
this.secure = this.protocol === 'https';
5151
this.ips = (this.get('X-Forwarded-For') || '').split(', ');
5252
this.ip = this.ips[0];
53+
// Alternative way to obtain the source IP
54+
// this.ip = event.requestContext.identity.sourceIp
5355
this.host = this.get('X-Forwarded-Host') || this.hostname;
5456
this.xhr = (this.get('X-Requested-With') || '').toLowerCase() === 'xmlhttprequest';
5557

0 commit comments

Comments
 (0)