Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 523
Randy Hall Avatar asked Mar 24 '26 04:03

Randy Hall


1 Answers

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

like image 192
hephalump Avatar answered Mar 27 '26 08:03

hephalump



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!