Hello!
On Fri, Dec 7, 2012 at 1:26 AM, Avinash Bijja wrote:
> I am new to this group and this is my first post.
>
Welcome!
> Issue: I use Amazon's CDN CloudFront to serve pages but have an issue with a
> URL, so i just want to tell cloudfront to dont cache a particular page/url.
> I want to set no-cache in header for a particular URL using
> headers-more-module.
>
You're encouraged to use ngx_lua instead of ngx_headers_more for this:
location ... {
...
header_filter_by_lua '
if ngx.var.uri == "/foo" then
ngx.header["Cache-Control"] = "no-cache"
end
';
}
Because it is Lua, you can do arbitrarily complicated test against URL
(or any other things) here :)
Best regards,
-agentzh