Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add '--noStripTrailingSlashInUrl' option #1178

Merged
merged 1 commit into from May 9, 2021

Conversation

grakic
Copy link

@grakic grakic commented Feb 15, 2021

Description

Add --noStripTrailingSlashInUrl option passing ending slash to Lambda event.

Motivation and Context

We have Lambda responding on HTTP event having /{any+} path. Currently it is not possible to receive trailing slash in the requested event path. Both /dev/hello and /dev/hello/ are sent to Lambda as /dev/hello.

Extra option allows event to be set with a trailing slash and allows request to be sent to Lambda with a trailing slash.

Copy link
Collaborator

@pgrzesik pgrzesik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @grakic - it looks great overall, I just have one small comment and we should be good to go 🙌

src/config/commandOptions.js Show resolved Hide resolved
@grakic grakic requested a review from pgrzesik May 3, 2021 11:49
@grakic
Copy link
Author

grakic commented May 3, 2021

@pgrzesik I was checking how this change relates to 5ce8f87, but seems like both are still needed.

We have to pass path with trailing slash to hapi request first (this change) before event can be built using request path.

Copy link
Collaborator

@pgrzesik pgrzesik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the cleanup and confirmation @grakic 👍

@pgrzesik pgrzesik merged commit 4dbab1a into dherault:master May 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants