You can specify the minimum, default, as well as the maximum cache duration in the CloudFront cache. CloudFront will use these settings, and compare them with values in the responses coming from origins, as passed with
s-maxage, or based on the date specified in the
Now, when a client makes a request to CloudFront, CloudFront will respect the settings specified in the Cache policy. This is both for performance (better cache utilization) as well as security reasons to protect your origin - most of our customers don't want their origins to be abused by external actors if CloudFront behavior was configured to always cache the responses.
CloudFront documentation specifies that "You cannot use the HTTP Cache-Control or Pragma header fields in a GET request from a viewer to force CloudFront to go back to the origin server for the object. CloudFront ignores those header fields in viewer requests." We don't have options currently to disable this behavior.
- asked 7 months ago
- AWS OFFICIALUpdated 5 months ago
- How do I resolve the "No 'Access-Control-Allow-Origin' header is present on the requested resource" error from CloudFront?AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 6 months ago
- AWS OFFICIALUpdated 7 months ago
- EXPERTpublished a month ago