conf如下:
```
worker_processes 1;
daemon off;
error_log /dev/stdout warn;
events{
worker_connections 32;
}
http {
server {
listen 8080;
set $dog server_level;
location / {
set $dog location_level;
access_by_lua '
local resp = ngx.location.capture("/sub", { copy_all_vars = true });
ngx.say(resp.body)
';
}
location /sub {
echo $dog;
}
}
}
```
运行后 `curl http://127.0.0.1:8080` 得到 `server_level`.
官方指南里提到过类似的用法: https://github.com/openresty/lua-nginx-module#ngxlocationcapture,但是并没有在server block中有set。
请问一下这是预料之中的嘛?