I resolved this issue, the result is in this gist should anyone wish to use it: https://gist.github.com/shrikeh/4722427 Thanks.by shrikeh - Nginx Mailing List - English
Here is what I'm trying to achieve: 1. Backend sends response header saying "this page requires filtering". 2. Lua script generates a token, and populates the appropriate tag in the body copy with the token. 3. Token is pushed into user's cookies and also stored in Redis. From what I can gather, to do this, I need to: 1. Add conditional logic within body_filter_by_lua based onby shrikeh - Nginx Mailing List - English
Hi! Thanks for the responses. Is there any way for nginx to work conditionally based on headers in the upstream response?by shrikeh - Nginx Mailing List - English
Hi, I'm currently using OpenResty, and one of the things I am trying to do is have the backend send a specific header, and if that header is present, run a body_filter_by_lua call on the output. However, while I can use the $upstream_http_* vars for populating (i.e. I can go add_header SomeHeader $upstream_http_foo, and if Foo has been sent see SomeHeader: FooVar in the output. However, all tesby shrikeh - Nginx Mailing List - English