Search code examples
amazon-web-servicesreferreraws-lambda-edge

Get referrer within AWS Lambda@edge


Not seeing the referrer in the documented event structure, and I haven't seen anything in the object in my test lambda - but that's not necessarily an accurate representation of a live request.

Is there a way to determine the referrer in the request inside a lambda@edge. Specifically, I'm working within the ClientRequest.


Solution

  • As per the AWS docs here, CloudFront removes the Referer header. If you wish to forward your Referer header you can whitelist it in the Cache Behaviour settings here:

    enter image description here