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 Answers
1
Accepted Answer

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
answered 10 months ago
profile picture
EXPERT
reviewed 10 days ago
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
EXPERT
answered 10 months ago
  • Thanks. Is there something with prefix apigw? because it works for any lowercase headers but particularly not the headers that has prefix apigw

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions