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 Risposte
1
Risposta accettata

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
con risposta un anno fa
profile picture
ESPERTO
verificato un mese fa
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
ESPERTO
con risposta un anno fa
  • Thanks. Is there something with prefix apigw? because it works for any lowercase headers but particularly not the headers that has prefix apigw

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande