-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
fix(aws-lambda) Fix typo in X-Amz-Function-Error header #2676
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch! Sorry that we let this slip through!
@@ -279,7 +279,7 @@ http { | |||
local function say(res, status) | |||
ngx.header["x-amzn-RequestId"] = "foo" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to use the same prefix as well here? X-Amz-RequestId
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@thibaultcha this is actually correct based on the response from Lambda (you can see the response headers in my original issue comment).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting... They have different response headers prefixes then... 🤔 LGTM then!
@thibaultcha yea, was confused when I created a custom plugin for testing since we'll start depending on these changes out today (we were previously pushing back until 10.4 was released). After these changes the response code is correctly updated for unhandled errors (I'll add handled error support in another PR). Next time around we'll have the automation ready to test custom plugins on our kong installations vs. depending on unit tests etc. 👌 |
Today I noticed that I mistakenly added a☹️
n
to the aws lambda function http header.This fixes the aws-lambda plugin and specs to use the correct function header name as per the latest documentation at http://docs.aws.amazon.com/lambda/latest/dg/API_Invoke.html#API_Invoke_ResponseSyntax
I'll open a separate PR to support updating the status code for Handled errors.
suggested reviewers: @thibaultcha and @p0pr0ck5 since they helped me land #2587.