You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feature: implemented the balancer_by_lua_block and balancer_by_lua_file directives to allow NGINX load balancers written in Lua.
Also added pure C API to support the ngx.balancer Lua API implemented in
the lua-resty-core library.
Thanks Shuxin Yang, Dejiang Zhu, Brandon Beveridge, and others for the help.
Equivalent to [balancer_by_lua_block](#balancer_by_lua_block), except that the file specified by `<path-to-lua-script-file>` contains the Lua code, or, as from the `v0.5.0rc32` release, the [Lua/LuaJIT bytecode](#lualuajit-bytecode-support) to be executed.
2292
+
2293
+
When a relative path like `foo/bar.lua` is given, they will be turned into the absolute path relative to the `server prefix` path determined by the `-p PATH` command-line option while starting the Nginx server.
2294
+
2295
+
This directive was first introduced in the `v0.10.0` release.
Retrieves the current request's request method name. Strings like `"GET"` and `"POST"` are returned instead of numerical [method constants](#http-method-constants).
Equivalent to [[#balancer_by_lua_block|balancer_by_lua_block]], except that the file specified by <code><path-to-lua-script-file></code> contains the Lua code, or, as from the <code>v0.5.0rc32</code> release, the [[#Lua/LuaJIT bytecode support|Lua/LuaJIT bytecode]] to be executed.
1921
+
1922
+
When a relative path like <code>foo/bar.lua</code> is given, they will be turned into the absolute path relative to the <code>server prefix</code> path determined by the <code>-p PATH</code> command-line option while starting the Nginx server.
1923
+
1924
+
This directive was first introduced in the <code>v0.10.0</code> release.
1925
+
1856
1926
== lua_need_request_body ==
1857
1927
1858
1928
'''syntax:''' ''lua_need_request_body <on|off>''
@@ -2427,7 +2497,7 @@ These constants are usually used by the [[#ngx.log|ngx.log]] method.
Writes argument values into the nginx <code>error.log</code> file with the <code>ngx.NOTICE</code> log level.
2433
2503
@@ -2442,7 +2512,7 @@ Lua <code>nil</code> arguments are accepted and result in literal <code>"nil"</c
2442
2512
There is a hard coded <code>2048</code> byte limitation on error message lengths in the Nginx core. This limit includes trailing newlines and leading time stamps. If the message size exceeds this limit, Nginx will truncate the message text accordingly. This limit can be manually modified by editing the <code>NGX_MAX_ERROR_STR</code> macro definition in the <code>src/core/ngx_log.h</code> file in the Nginx source tree.
Retrieves the current request's request method name. Strings like <code>"GET"</code> and <code>"POST"</code> are returned instead of numerical [[#HTTP method constants|method constants]].
3103
3173
@@ -3240,7 +3310,7 @@ See also [[#ngx.req.set_uri|ngx.req.set_uri]].
When <code>status >= 200</code> (i.e., <code>ngx.HTTP_OK</code> and above), it will interrupt the execution of the current request and return status code to nginx.
3955
4025
@@ -6099,6 +6169,22 @@ for more details.
6099
6169
6100
6170
This feature requires at least ngx_lua <code>v0.10.0</code>.
0 commit comments