Welcome! Log In Create A New Profile

Advanced

Re: $upstream_http_* variables exist but do not seem to be readable

February 04, 2013 06:09AM
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 on the value of ngx.var.sent_http_csrf
2. Generate the token
3. Filter the body.
4. Make a subrequest with the token to a separate internal location block so that Redis can save the token (as redis will be disabled within the context of body_filter_by_lua)
Subject Author Posted

$upstream_http_* variables exist but do not seem to be readable

shrikeh February 01, 2013 08:59AM

Re: $upstream_http_* variables exist but do not seem to be readable

Maxim Dounin February 01, 2013 09:50AM

Re: $upstream_http_* variables exist but do not seem to be readable

agentzh February 01, 2013 03:28PM

Re: $upstream_http_* variables exist but do not seem to be readable

shrikeh February 04, 2013 03:12AM

Re: $upstream_http_* variables exist but do not seem to be readable

shrikeh February 04, 2013 06:09AM

Re: $upstream_http_* variables exist but do not seem to be readable

shrikeh February 08, 2013 11:56AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 64
Record Number of Users: 5 on July 11, 2016
Record Number of Guests: 271 on July 19, 2016
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready