Welcome! Log In Create A New Profile

Advanced

Want to do some modification if page served from cache

Posted by chintans 
Want to do some modification if page served from cache
February 26, 2017 07:39AM
Hi All,

I would like to do some modification like set cookie, remove some header field only if page is served from cache and for rest pass response directly to client. I see there are some modules like nginscript, not sure if can be done through those.

Any help is greatly appreciated as trying for few days and not able to achieve.

Thanks !
Re: Want to do some modification if page served from cache
February 27, 2017 08:19AM
I also tried, if($upstream_cache_status = "HIT") { } but not able to get in to block.

Question is how to catch that processing state so that I can do some modification before page is sent to client
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 253
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