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

Always set req.url to a valid value #314

Closed
plumdog opened this issue Mar 12, 2020 · 0 comments · Fixed by #315
Closed

Always set req.url to a valid value #314

plumdog opened this issue Mar 12, 2020 · 0 comments · Fixed by #315

Comments

@plumdog
Copy link
Contributor

plumdog commented Mar 12, 2020

Describe the bug
The following
https://github.com/danielcondemarin/serverless-next.js/blob/8da92e2d8e23e361c24904e4579e9d4e02845126/packages/next-aws-lambda/lib/compatLayer.js#L15-L18
may set req.url to be an empty string - because event.requestContext.path will be '' (or will possibly be the stage name, with no trailing slash?) if you access AWS API Gateway at apidomain.com/stageName with no trailing slash.

To Reproduce
Either set up API gateway running things in Lambda (probably not worth the hassle) or create a test for this behavior (I intend to open a PR that does this)

Expected behavior
req.url should be set to a valid value

Additional context
See vercel/next.js#10953

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 a pull request may close this issue.

1 participant