Expose the raw http path coming from the lambda event. #453
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The API GW url includes th API GW stage information, so it's not easy to know what's the raw http path coming into the event.
With this change, we expose the raw http path in a general way, so people that need to know the exact raw path have a common interface, regardless of where the event comes from.
I believe this is a better solution to #450 than #451 because the AWS documentation explicitly says that the API GW URL includes the stage when requests come in, see https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-custom-domains.html, so our behavior is going to be more expected by API GW users with our current implementation. However, I see the need to access the raw path when you write integrations with other services. With this change, people can access that raw path in a consistent manner regardless where the event comes from.
/cc @bnusunny
Signed-off-by: David Calavera [email protected]
By submitting this pull request