-
Notifications
You must be signed in to change notification settings - Fork 148
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(parser): handle API Gateway Test UI sourceIp (#2531)
- Loading branch information
1 parent
9624ad8
commit cd6c512
Showing
4 changed files
with
98 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
81 changes: 81 additions & 0 deletions
81
packages/parser/tests/events/apiGatewayProxyEventTestUI.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
{ | ||
"version": "1.0", | ||
"resource": "/my/path", | ||
"path": "/my/path", | ||
"httpMethod": "GET", | ||
"headers": { | ||
"Header1": "value1", | ||
"Header2": "value2", | ||
"Origin": "https://aws.amazon.com" | ||
}, | ||
"multiValueHeaders": { | ||
"Header1": [ | ||
"value1" | ||
], | ||
"Header2": [ | ||
"value1", | ||
"value2" | ||
] | ||
}, | ||
"queryStringParameters": { | ||
"parameter1": "value1", | ||
"parameter2": "value" | ||
}, | ||
"multiValueQueryStringParameters": { | ||
"parameter1": [ | ||
"value1", | ||
"value2" | ||
], | ||
"parameter2": [ | ||
"value" | ||
] | ||
}, | ||
"requestContext": { | ||
"accountId": "123456789012", | ||
"apiId": "id", | ||
"authorizer": { | ||
"claims": null, | ||
"scopes": null | ||
}, | ||
"domainName": "id.execute-api.us-east-1.amazonaws.com", | ||
"domainPrefix": "id", | ||
"extendedRequestId": "request-id", | ||
"httpMethod": "GET", | ||
"identity": { | ||
"accessKey": null, | ||
"accountId": null, | ||
"caller": null, | ||
"cognitoAuthenticationProvider": null, | ||
"cognitoAuthenticationType": null, | ||
"cognitoIdentityId": null, | ||
"cognitoIdentityPoolId": null, | ||
"principalOrgId": null, | ||
"sourceIp": "test-invoke-source-ip", | ||
"user": null, | ||
"userAgent": "user-agent", | ||
"userArn": null, | ||
"clientCert": { | ||
"clientCertPem": "CERT_CONTENT", | ||
"subjectDN": "www.example.com", | ||
"issuerDN": "Example issuer", | ||
"serialNumber": "a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1", | ||
"validity": { | ||
"notBefore": "May 28 12:30:02 2019 GMT", | ||
"notAfter": "Aug 5 09:36:04 2021 GMT" | ||
} | ||
} | ||
}, | ||
"path": "/my/path", | ||
"protocol": "HTTP/1.1", | ||
"requestId": "id=", | ||
"requestTime": "04/Mar/2020:19:15:17 +0000", | ||
"requestTimeEpoch": 1583349317135, | ||
"resourceId": null, | ||
"resourcePath": "/my/path", | ||
"stage": "$default" | ||
}, | ||
"pathParameters": null, | ||
"stageVariables": null, | ||
"body": "Hello from Lambda!", | ||
"isBase64Encoded": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters