Welcome! Log In Create A New Profile

Advanced

$upstream_http_ в post_action ?

Alexandre Snarskii
September 30, 2010 07:46AM
Hi!

Я правильно понимаю, что из всего богатства переменных $upstream_*
на уровне post_action можно получить доступ только к $upstream_addr,
но не к $upstream_http_*, или это у меня руки кривые ? :)

Конфиг прост:

upstream backend {
server <......>:80;
}
server {
location /fcsetc/ {
proxy_pass http://backend;
proxy_set_header Host <somewhat>;
post_action @posta;
}
location @posta {
internal ; # или не internal, рояли не играет
#include fastcgi_params;
#fastcgi_param UPSTREAM_COOKIE $upstream_http_set_cookie;
#fastcgi_param UPSTREAM2_COOKIE $upstream_http_xrccookie;
#fastcgi_param UPSTREAM_ADDR $upstream_addr;
#fastcgi_param UPSTREAM_SERVER $upstream_http_server;
#fastcgi_pass localhost:8091;
proxy_pass http://127.0.0.1:8092;
proxy_set_header SCookie $upstream_http_set_cookie;
proxy_set_header S2Cookie $upstream_http_xrccookie;
proxy_set_header S3Addr $upstream_addr;
proxy_set_header S4Server $upstream_http_server;
}
}

Что в случае с fastcgi_pass, что в случае с proxy_pass удается получить
$upstream_addr, но захватить куку (или любой другой заголовок), отданный
backend'ом не получается :(

PS: можно, конечно, отказаться от post_action (ибо он трет собой
$upstream_http) и тупо эту куку логировать отслеживая лог в near-realtime,
но это уж как-бы совсем через одно место...

--
In theory, there is no difference between theory and practice.
But, in practice, there is.

_______________________________________________
nginx-ru mailing list
nginx-ru@nginx.org
http://nginx.org/mailman/listinfo/nginx-ru
Subject Author Posted

$upstream_http_ в post_action ?

Alexandre Snarskii September 30, 2010 07:46AM

Re: $upstream_http_ в post_action ?

Alex Vorona September 30, 2010 08:00AM

Re: $upstream_http_ в post_action ?

Alexandre Snarskii September 30, 2010 10:58AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 249
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready