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

已提問 1 年前檢視次數 494 次
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

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南