-
Notifications
You must be signed in to change notification settings - Fork 514
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
Nuxt 3.0.0-rc.9 with Nitro 0.5.0 configuration error: Malformed Lambda proxy response #504
Comments
@danielroe |
Yes, Nitro presets are fully extensible. Copy this file into your project, make the necessary changes, and set (Of course, we do plan to fix the issue in Nitro itself!) |
Thank you for your prompt response. I will try the approach you suggested. |
@datake914 (and others affected): sorry about the push for the change in #357 -- the separate |
This solution doesn't seem to work with current version of nuxt, any suggestion on how to do this? |
@timmak I specify in
|
@datake914 Maybe what I am missing is where to import |
@danielroe What are those changes? I am trying to do this with the cloudflare-pages.ts one and I can't get it to work. |
The path to nitro.entry.ts should be absolute, so for me this worked (considering nitro.entry.ts is placed in the root folder of the project):
|
I had to fix path to the nitro app and comment-out cookies in the response:
|
@danielroe I've managed to make AWS Lambda work, the instructions are above, the simplest solution for this issue is adding another aws-lambda-no-cookies preset to nitro. |
Environment
Nuxt 3.0.0-rc.9 with Nitro 0.5.0
Reproduction
I build the Nuxt app with aws-lambda deployment setting and configured Amazon API Gateway proxy integration to work with this lambda function.
When I call my endpoint, I receive a configuration error and an HTTP 502 status code.
Describe the bug
As I commented in the PR (#357 (comment)), this is due to the fact that cookies are returned in the response object.
For API Gateway to handle a Lambda function's response, the function must return output according to the following JSON format. Additional fields are not allowed.
cf. https://aws.amazon.com/premiumsupport/knowledge-center/malformed-502-api-gateway/?nc1=h_ls
Additional context
Related Issues and PRs are as follows.
Logs
No response
The text was updated successfully, but these errors were encountered: