Response headers adding/filtering during proxy with njs

Grzegorz Kulewski gk at
Tue Jan 19 15:44:20 UTC 2021


Is it possible to (at least) add (or better also) filter response headers (like for example setting or modifying or deleting cookies, of course without harming other cookies set by the upstream) dynamically from njs after it is returned from the upstream (or cache) and before it is sent to the client?

I think something like that is possible with lua but I would really like to avoid using 3rd party modules and just go the njs route.

If not possible - is there any workaround? And/or can it be easily added in next release(s)?

Thank you in advance.

Grzegorz Kulewski

More information about the nginx mailing list