首页 > 解决方案 > AWS CloudFront - bypass cache depending on the presence of a certain header or cookie?

问题描述

I wonder if it is possible to bypass the cache and hit the origin when a certain header or cookie exists in the requests? If yes, could you tell me the direction how to implement it, please?

标签: amazon-cloudfront

解决方案


我能想到的唯一方法是使用lambda edge。在查看器请求上添加 lambda 函数以检查特定标头或 cookie,然后添加Cache-Control: no-store.


推荐阅读