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

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ