Welcome! Log In Create A New Profile

Advanced

Re: Setting cache control and expires inside a module

April 26, 2012 08:56PM
Hi Maxim,

thanks for your response.
I was hoping it had a specific function in the nginx core for that. I
looked the ngx_http_set_expires function before ask to the list,
but don't want to copy the code, if was possible to just call some function
will be better.
If don't have any other way, I will implement based on that code.

Regards,
Wandenberg

On Thu, Apr 26, 2012 at 11:33 AM, Maxim Dounin <mdounin@mdounin.ru> wrote:

> Hello!
>
> 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.
>
> Maxim Dounin
>
> >
> > Regards,
> > Wandenberg
> >
> > On Thu, Apr 26, 2012 at 8:19 AM, Brian Akins <brian@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@nginx.org
> > > http://mailman.nginx.org/mailman/listinfo/nginx-devel
> > >
>
> > _______________________________________________
> > nginx-devel mailing list
> > nginx-devel@nginx.org
> > http://mailman.nginx.org/mailman/listinfo/nginx-devel
>
> _______________________________________________
> nginx-devel mailing list
> nginx-devel@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx-devel
>
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

Setting cache control and expires inside a module

wandenberg 1416 April 25, 2012 12:16AM

Re: Setting cache control and expires inside a module

Brian Akins 500 April 26, 2012 07:20AM

Re: Setting cache control and expires inside a module

wandenberg 556 April 26, 2012 09:06AM

Re: Setting cache control and expires inside a module

Maxim Dounin 670 April 26, 2012 10:34AM

Re: Setting cache control and expires inside a module

wandenberg 786 April 26, 2012 08:56PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 298
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready