-
Notifications
You must be signed in to change notification settings - Fork 351
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
lambda_http 0.11.3 breaks response headers #876
Comments
This also broke us, it broke CORS Allow-Origin headers in our case. |
Ugh. I'm very sorry about that. I've yanked that version from crates.io. It looks like this is not consistent in all the integrations: #852. We'll investigate further. |
@jantb how did you create your APIGW? I wonder if there are some settings that we're missing, and affect how headers are returned |
@shortjared which service do you integrate with, APIGW? which kind? If you have any configuration that you can share, it'd be very helpful. |
Here is the setup of the http APIGW: val httpApi =
HttpApi(
this, "Api", HttpApiProps.builder()
.apiName("api")
.corsPreflight(
CorsPreflightOptions.builder().allowOrigins(
listOf(
"xxx",
"xxx",
"http://localhost:8080",
)
).allowMethods(CorsHttpMethod.entries)
.build()
)
.build()
) and the functions are added with: AddRoutesOptions.builder().path(path).methods(listOf(method))
.integration(
HttpLambdaIntegration(
"$functionName-integration",
function
)
).build() Cloudformation: {"Api": {
"Type": "AWS::ApiGatewayV2::Api",
"Properties": {
"CorsConfiguration": {
"AllowMethods": [
"*",
"DELETE",
"GET",
"HEAD",
"OPTIONS",
"PATCH",
"POST",
"PUT"
],
"AllowOrigins": [
"",
"",
"http://localhost:8080"
]
},
"Name": "api",
"ProtocolType": "HTTP"
},
"Metadata": {
"aws:cdk:path": "xxx/Api/Resource"
}
}
} {
"ApiGETservehtmlintegration": {
"Type": "AWS::ApiGatewayV2::Integration",
"Properties": {
"ApiId": {
"Ref": "ApiF"
},
"IntegrationType": "AWS_PROXY",
"IntegrationUri": {
"Fn::GetAtt": [
"servehtml",
"Arn"
]
},
"PayloadFormatVersion": "2.0"
},
"Metadata": {
"aws:cdk:path": "xxxx/Api/GET--/serve-html-integration/Resource"
}
}}
|
Also reporting that lambda function URL regression (previously in #871) is still present in 0.11.3. Lambda function URLs use API gateway v2 format:
https://docs.aws.amazon.com/lambda/latest/dg/urls-invocation.html#urls-payloads Note that in #852, the author references a pull request from
They currently handle header keys differently based on integration types there on |
This issue is now closed. Comments on closed issues are hard for our team to see. |
I'm getting no response headers when using the latest version of lambda http,
I am using this config in cargo.toml
lambda_http = { version = "=0.11.3",default-features = false, features = ["apigw_http"] }
0.11.1 does not have this issue:
Here is how I set the response in the handler
curl -v shows this as the headers with version 0.11.1
and for 0.11.3:
This seems related to this commit
fc49dd5
which is the only one in 0.11.3
The text was updated successfully, but these errors were encountered: