Custom Headers in API Gateway HTTP API

0

Hi,

In our API Gateway, we have created an API type 'HTTP API' and routes to our Services(running in ECS Fargate) via VPC Loadbalancer.

Currently, we are facing an issue where the custom request headers that are passed from the client are not passed through to the services. Below are the custom headers that we are trying to pass through the API GW, which is failing:

apigw-clientapp apigw-api-key apigw-tracking-header

Can you please help us resolve this.?

Please note that, if we are sending an uppercase letter in the above headers, it is passing through(but converts all the uppercase letters to lowercase when services receive the headers). We are not sure about this behaviour and require your support to analyze this as well. Thanks in advance

2 回答
1
已接受的回答

The list of API Gateway Reserved Headers contains apigw-: https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-parameter-mapping.html#http-api-mapping-reserved-headers

I recommend selecting a different header name.

profile picture
已回答 1 年前
profile picture
专家
已审核 1 个月前
0

Hi,

This seems to have been a problem already in the past: see https://github.com/aws/aws-lambda-dotnet/issues/915 But ticket is closed probably because according to documentation

Header names and query parameters are processed in a case-sensitive way.

See https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-known-issues.html and check the full table on this page for all standard parameters

profile pictureAWS
专家
已回答 1 年前
  • Thanks. Is there something with prefix apigw? because it works for any lowercase headers but particularly not the headers that has prefix apigw

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则