Setting cache control and expires inside a module
mdounin at mdounin.ru
Thu Apr 26 14:33:35 UTC 2012
On Thu, Apr 26, 2012 at 10:04:29AM -0300, Wandenberg Peixoto wrote:
> Hi Brian,
> I need to this inside my module, it already exists.
> Actually it responds to GET method and I need to add response to OPTIONS
> methods to support cross domain access,
> but want to send the response with cache headers, only for OPTIONS.
> This is the reason I need to do that by code.
I really wonder why you ever asked, I'm pretty sure you'll be able
to write correct code yourself. See ngx_http_set_expires() in
ngx_http_headers_module.c for an example.
> On Thu, Apr 26, 2012 at 8:19 AM, Brian Akins <brian at akins.org> wrote:
> > On Apr 25, 2012, at 12:15 AM, Wandenberg Peixoto wrote:
> > > I need to add response to OPTIONS method to a module to allow cross
> > domain access,
> > > but I want to set cache control and expires headers, only for this
> > method, to browsers does not ask this method frequently.
> > I did this in a simple Lua script. Could do the same with perl.
> > _______________________________________________
> > nginx-devel mailing list
> > nginx-devel at nginx.org
> > http://mailman.nginx.org/mailman/listinfo/nginx-devel
> nginx-devel mailing list
> nginx-devel at nginx.org
More information about the nginx-devel