I have a lambda function which performs 301 redirect if it has uri that is generated using regex. On deploying the function and adding it to the cloudfront behaviors, when I go to to the url https:my-website/xyz/faq/max, eventhough I see the status of 301 for https:my-website/xyz/faq/max after correctly re-ro…
Tag: aws-lambda-edge
Getting the client request domain from Lambda@Edge function
I’m trying do something like below for HTTP 301 redirect, so that web users will redirect to different news pages. However, seems like this request.origin.domainName == “mydomain.com” part is not working in my function. Is this correct way to pick the domain name which client coming from? I …