Cloudfront randomly removes Range header

0

I am trying to use CloudFront for partial GET requests (with Range header) with caching enabled. I added Range header to the cache key settings in the cache policy. When a partial GET request is sent with proper Range header value, it works as expected most of the time. But in some cases, CloudFront drops the Range header from the Origin request and Origin (API Gateway) returns "Integration response of reported length 691691016 is larger than allowed maximum of 10485760 bytes" because of this. This behavior seems to be completely random. When I resend the exact same request, it returns a successful response with HTTP code 206. When I disable caching, this behavior does not occur.

  1. Is it necessary to add the Range header to cache policy for partial requests to work or is it forwarded automatically?
  2. What other settings can affect this behavior?

Thank you!

asked 3 months ago84 views
No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions