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)
SubjectAuthorPosted

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

shrikehFebruary 01, 2013 08:59AM

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

Maxim DouninFebruary 01, 2013 09:50AM

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

agentzhFebruary 01, 2013 03:28PM

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

shrikehFebruary 04, 2013 03:12AM

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

shrikehFebruary 04, 2013 06:09AM

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

shrikehFebruary 08, 2013 11:56AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 60
Record Number of Users: 7 on March 06, 2014
Record Number of Guests: 229 on August 01, 2014
Powered by nginx    Powered by FreeBSD    PHP Powered    Powered by Percona     ipv6 ready