We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 279a018 commit 3060487Copy full SHA for 3060487
src/request.js
@@ -50,6 +50,8 @@ class Request extends ReadableStream {
50
this.secure = this.protocol === 'https';
51
this.ips = (this.get('X-Forwarded-For') || '').split(', ');
52
this.ip = this.ips[0];
53
+ // Alternative way to obtain the source IP
54
+ // this.ip = event.requestContext.identity.sourceIp
55
this.host = this.get('X-Forwarded-Host') || this.hostname;
56
this.xhr = (this.get('X-Requested-With') || '').toLowerCase() === 'xmlhttprequest';
57
0 commit comments