My expectation is that, when a request made to CloudFront and there is no cache found, CloudFront forwards the request to my S3 website endpoint with the custom header
X-Origin-Verify. But in reality, my website endpoint doesn’t receive the custom header: I have redirected all requests coming to website endpoint to an API Gateway to check and found no
X-Origin-Verify in requests’ header.
From the docs https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/add-origin-custom-headers.html#add-origin-custom-headers-configure, it seems adding custom header in “CloudFront > Distributions > Edit origin” would be enough, so I wonder why it does not work for me, or do I need to do something else?
This question is not yet answered, be the first one who answer using the comment. Later the confirmed answer will be published as the solution.