1

做 ?表示它可以作为变量 foo 被 ngx_postgres 访问?

我只需要确认这一点。 https://github.com/FRiCKLE/ngx_postgres#sample-configuration-5

这是纯粹的 ngx_postgres 函数,还是 nginx 也可以独立使用?

4

1 回答 1

1

这就是名为 captures功能的 nginx 标准正则表达式:

例如:

有了这个位置:

location ~ /numbers/(?<num>\d+) {
 # I captured one ore more digits into the variable $num    
   ...
}

如果请求是 /numbers/100

变量$num(值为 100)在您的位置可用。

于 2015-09-28T18:22:56.740 回答