2 Answers
- Newest
- Most votes
- Most comments
5
Considering this:
- Use "All Viewer Headers" in Origin Request Policy – This ensures the Authorization header is forwarded, but it may introduce performance trade-offs.
- Include Authorization in Cache Policy – If you add the Authorization header to the cache key, CloudFront automatically forwards it to the origin.
- Use Signed Cookies or Query Strings – Instead of relying on Authorization headers, consider using signed cookies or query strings for authentication.
https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/header-caching.html
0
Hey,
Hope you're keeping well.
In the legacy cache settings, the Authorization header is always forwarded to the origin and, if included in the cache key, used for cache differentiation as well. You can confirm this by checking your CloudFront distribution’s behavior settings in the console under Behaviors > Edit, where the header forwarding configuration is shown. In the new policy model, Authorization cannot be explicitly listed in an Origin Request Policy due to its sensitive nature, but if you add it to the cache key in a Cache Policy, CloudFront automatically forwards it to the origin.
Thanks and regards,
Taz
answered 10 months ago
Relevant content
- AWS OFFICIALUpdated 2 years ago

Using "All Viewer Headers" in the origin request policy would forward all headers to the origin, which is not what I want. I believe that including the Authorization header in the cache policy is the best solution for my use case, as it ensures only the necessary header is forwarded without impacting cache performance. Thank you very much for the guidance.