docs: updated docs to reflect recent changes in set_by_lua.

This commit is contained in:
agentzh (章亦春) 2012-05-24 21:48:32 +08:00
Родитель 89ba489830
Коммит 3d6f752a0f
3 изменённых файлов: 16 добавлений и 0 удалений

8
README
Просмотреть файл

@ -334,6 +334,10 @@ Directives
set_by_lua $bar 'tonumber(ngx.var.foo) + 1';
set $baz "bar: $bar"; # $baz == "bar: 33"
Since the "0.5.0rc29" release, Nginx variable interpolation is disabled
in the "<lua-script-str>" argument of this directive, and you can use
the dollar sign character ("$") directly.
This directive requires the ngx_devel_kit
(<https://github.com/simpl/ngx_devel_kit>) module.
@ -348,6 +352,10 @@ Directives
Equivalent to set_by_lua, except that the file specified by
"<path-to-lua-script-file>" contains the Lua code to be executed.
Nginx variable interpolation is supported in the
"<path-to-lua-script-file>" argument string of this directive. But
special care must be taken for injection attacks.
When the Lua code cache is turned on (by default), the user code is
loaded once at the first request and cached and the Nginx config must be
reloaded each time the Lua source file is modified. The Lua code cache

Просмотреть файл

@ -328,6 +328,8 @@ This directive can be freely mixed with all directives of the [HttpRewriteModule
set $baz "bar: $bar"; # $baz == "bar: 33"
Since the `0.5.0rc29` release, Nginx variable interpolation is disabled in the `<lua-script-str>` argument of this directive, and you can use the dollar sign character (`$`) directly.
This directive requires the [ngx_devel_kit](https://github.com/simpl/ngx_devel_kit) module.
set_by_lua_file
@ -340,6 +342,8 @@ set_by_lua_file
Equivalent to [set_by_lua](http://wiki.nginx.org/HttpLuaModule#set_by_lua), except that the file specified by `<path-to-lua-script-file>` contains the Lua code to be executed.
Nginx variable interpolation is supported in the `<path-to-lua-script-file>` argument string of this directive. But special care must be taken for injection attacks.
When the Lua code cache is turned on (by default), the user code is loaded once at the first request and cached
and the Nginx config must be reloaded each time the Lua source file is modified.
The Lua code cache can be temporarily disabled during development by

Просмотреть файл

@ -312,6 +312,8 @@ This directive can be freely mixed with all directives of the [[HttpRewriteModul
set $baz "bar: $bar"; # $baz == "bar: 33"
</geshi>
Since the <code>0.5.0rc29</code> release, Nginx variable interpolation is disabled in the <code><lua-script-str></code> argument of this directive, and you can use the dollar sign character (<code>$</code>) directly.
This directive requires the [https://github.com/simpl/ngx_devel_kit ngx_devel_kit] module.
== set_by_lua_file ==
@ -323,6 +325,8 @@ This directive requires the [https://github.com/simpl/ngx_devel_kit ngx_devel_ki
Equivalent to [[#set_by_lua|set_by_lua]], except that the file specified by <code><path-to-lua-script-file></code> contains the Lua code to be executed.
Nginx variable interpolation is supported in the <code><path-to-lua-script-file></code> argument string of this directive. But special care must be taken for injection attacks.
When the Lua code cache is turned on (by default), the user code is loaded once at the first request and cached
and the Nginx config must be reloaded each time the Lua source file is modified.
The Lua code cache can be temporarily disabled during development by