We have a NextJS application deployed on S3 and Lambda@Edge, we need to grab the request url (i.e. the Cloudfront URL from where the request was initiated), but when reading the host from the headers, we only get the S3 Bucket url serving as origin.
In essence, this is what we need: someId.cloudfront.net, this is what we get: some-bucket.s3.region.amazonaws.com
What are some alternatives to obtain the cloudfront url on the nextjs api? Thank you!