Welcome! Log In Create A New Profile

Advanced

Re: filter to modify upstream response before it is cached

Francis Daly
January 13, 2020 05:04AM
On Fri, Jan 10, 2020 at 04:57:32PM -0800, Roger Fischer wrote:

Hi there,

> is there a hook into the nginx processing to modify the response body (and headers) before they are cached when using with proxy_pass?
>

I don't know if there is such a hook; but I do know that you can introduce
another nginx-step to achieve the same end result.

That is: right now you have something like:

nginx: proxy_pass with cache -> upstream

Instead you can have

nginx: proxy_pass with cache -> nginx: proxy_pass with body filter
-> upstream

so that the output of the one run of your body filter is cached by the
first nginx.

f
--
Francis Daly francis@daoine.org
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

filter to modify upstream response before it is cached

roger_bc January 10, 2020 07:58PM

Re: filter to modify upstream response before it is cached

Francis Daly January 13, 2020 05:04AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 63
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready