I developed an AWS Lambda Proxy using Serverless in order to call a private API, process its result and return it.
It's simple enough, though the private API does not return anything once "X-Forwarded-For" is set in the HTTP request.
I haven't found a way to blacklist this header in CloudFront, nor in CloudFormation or API Gateway.
Where should I look for?
For reference, the serverless.yml
I use:
service: mylambda
provider:
name: aws
runtime: java8
memorySize: 1024
timeout: 240
package:
artifact: target/awslambda-1.0-SNAPSHOT.jar
functions:
leboncoinlist:
handler: com.example.awslambda.handler.HttpRequestHandler
events:
- http:
path: list
method: post
cors: true