1
xoxo 2014 年 5 月 13 日
|
2
LazyZhu 2014 年 5 月 13 日
我记得好像不行吧,ngx.location.capture / ngx.socket 是不能在 set_by_lua 里面用的
|
3
fghzpqm 2014 年 5 月 13 日
不行,set_by_lua 是运行在 rewrite 阶段,并且:
『This directive is implemented by injecting custom commands into the standard HttpRewriteModule's command list. Because HttpRewriteModule does not support nonblocking I/O in its commands, Lua APIs requiring yielding the current Lua "light thread" cannot work in this directive.』 http://wiki.nginx.org/HttpLuaModule#set_by_lua |
4
Livid MOD OP PRO 貌似今天刚刚发布的 1.7.1 里可以了:
http://nginx.org/en/docs/http/ngx_http_upstream_module.html $upstream_cookie_name cookie with the specified name sent by the upstream server in the “Set-Cookie” response header field (1.7.1). Only the last server’s response header fields are saved. 一会试验一下。 |