nginx: update lua module to latest openresty version

Update lua module to latest openrestry version. Additional config are
required to correctly use it.

Switch it to luajit from liblua as this is what is currently supported
for the module since plain lua support was dropped from the module.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
This commit is contained in:
Christian Marangi 2023-04-20 13:50:21 +02:00
parent 65a676ed56
commit cfce21ffea
No known key found for this signature in database
GPG key ID: AC001D09ADBFEAD7
2 changed files with 121 additions and 66 deletions

View file

@ -379,7 +379,7 @@ define naxsi
NGINX_MODULES += nginx-mod-naxsi NGINX_MODULES += nginx-mod-naxsi
endef endef
$(eval $(call module,lua, +liblua,ngx_http_lua, Enable Lua module)) $(eval $(call module,lua, +luajit,ngx_http_lua, Enable Lua module))
$(eval $(call module,stream, +@NGINX_STREAM_CORE_MODULE,ngx_stream, Add support for NGINX request streaming.)) $(eval $(call module,stream, +@NGINX_STREAM_CORE_MODULE,ngx_stream, Add support for NGINX request streaming.))
$(eval $(call module,ubus, +libubus +libjson-c +libblobmsg-json +@NGINX_UBUS,ngx_http_ubus, Enable UBUS api support directly from the server.)) $(eval $(call module,ubus, +libubus +libjson-c +libblobmsg-json +@NGINX_UBUS,ngx_http_ubus, Enable UBUS api support directly from the server.))
$(eval $(call module,dav-ext, +@NGINX_DAV,ngx_http_dav_ext, Enable the WebDAV methods PROPFIND OPTIONS LOCK UNLOCK.)) $(eval $(call module,dav-ext, +@NGINX_DAV,ngx_http_dav_ext, Enable the WebDAV methods PROPFIND OPTIONS LOCK UNLOCK.))
@ -395,8 +395,8 @@ PKG_CONFIG_DEPENDS += $(patsubst %,CONFIG_PACKAGE_%,$(NGINX_MODULES))
TARGET_CFLAGS += -DNGX_LUA_NO_BY_LUA_BLOCK TARGET_CFLAGS += -DNGX_LUA_NO_BY_LUA_BLOCK
ifneq ($(CONFIG_PACKAGE_nginx-mod-lua),) ifneq ($(CONFIG_PACKAGE_nginx-mod-lua),)
CONFIGURE_VARS += LUA_INC=$(STAGING_DIR)/usr/include \ CONFIGURE_VARS += LUAJIT_INC=$(STAGING_DIR)/usr/include/luajit-* \
LUA_LIB=$(STAGING_DIR)/usr/lib LUAJIT_LIB=$(STAGING_DIR)/usr/lib
endif endif
CONFIGURE_VARS += CONFIG_BIG_ENDIAN=$(CONFIG_BIG_ENDIAN) CONFIGURE_VARS += CONFIG_BIG_ENDIAN=$(CONFIG_BIG_ENDIAN)
@ -522,11 +522,11 @@ define Prepare/nginx-naxsi
endef endef
define Download/lua-nginx define Download/lua-nginx
VERSION:=e94f2e5d64daa45ff396e262d8dab8e56f5f10e0 VERSION:=68acad14e4a8f42e31d4a4bb5ed44d6f5b55fc1c
SUBDIR:=lua-nginx SUBDIR:=lua-nginx
FILE:=lua-nginx-module-$$(VERSION).tar.xz FILE:=lua-nginx-module-$$(VERSION).tar.xz
URL:=https://github.com/openresty/lua-nginx-module.git URL:=https://github.com/openresty/lua-nginx-module.git
MIRROR_HASH:=27729921964f066d97e99c263da153b34622a2f4b811114e4c3ee61c6fc71395 MIRROR_HASH:=366f24e1ba6221e34f6ba20ab29146438438f88c89fd71f9500d169b3f5aedf0
PROTO:=git PROTO:=git
endef endef

View file

@ -1,10 +1,9 @@
--- a/lua-nginx/src/ngx_http_lua_module.c --- a/lua-nginx/src/ngx_http_lua_module.c
+++ b/lua-nginx/src/ngx_http_lua_module.c +++ b/lua-nginx/src/ngx_http_lua_module.c
@@ -165,14 +165,14 @@ static ngx_command_t ngx_http_lua_cmds[] @@ -207,12 +207,14 @@ static ngx_command_t ngx_http_lua_cmds[]
NGX_HTTP_LOC_CONF_OFFSET,
offsetof(ngx_http_lua_loc_conf_t, log_socket_errors), offsetof(ngx_http_lua_loc_conf_t, log_socket_errors),
NULL }, NULL },
-
+#ifndef NGX_LUA_NO_BY_LUA_BLOCK +#ifndef NGX_LUA_NO_BY_LUA_BLOCK
{ ngx_string("init_by_lua_block"), { ngx_string("init_by_lua_block"),
NGX_HTTP_MAIN_CONF|NGX_CONF_BLOCK|NGX_CONF_NOARGS, NGX_HTTP_MAIN_CONF|NGX_CONF_BLOCK|NGX_CONF_NOARGS,
@ -12,16 +11,14 @@
NGX_HTTP_MAIN_CONF_OFFSET, NGX_HTTP_MAIN_CONF_OFFSET,
0, 0,
(void *) ngx_http_lua_init_by_inline }, (void *) ngx_http_lua_init_by_inline },
-
+#endif +#endif
{ ngx_string("init_by_lua"), { ngx_string("init_by_lua"),
NGX_HTTP_MAIN_CONF|NGX_CONF_TAKE1, NGX_HTTP_MAIN_CONF|NGX_CONF_TAKE1,
ngx_http_lua_init_by_lua, @@ -228,12 +230,14 @@ static ngx_command_t ngx_http_lua_cmds[]
@@ -186,14 +186,14 @@ static ngx_command_t ngx_http_lua_cmds[]
NGX_HTTP_MAIN_CONF_OFFSET,
0, 0,
(void *) ngx_http_lua_init_by_file }, (void *) ngx_http_lua_init_by_file },
-
+#ifndef NGX_LUA_NO_BY_LUA_BLOCK +#ifndef NGX_LUA_NO_BY_LUA_BLOCK
{ ngx_string("init_worker_by_lua_block"), { ngx_string("init_worker_by_lua_block"),
NGX_HTTP_MAIN_CONF|NGX_CONF_BLOCK|NGX_CONF_NOARGS, NGX_HTTP_MAIN_CONF|NGX_CONF_BLOCK|NGX_CONF_NOARGS,
@ -29,141 +26,157 @@
NGX_HTTP_MAIN_CONF_OFFSET, NGX_HTTP_MAIN_CONF_OFFSET,
0, 0,
(void *) ngx_http_lua_init_worker_by_inline }, (void *) ngx_http_lua_init_worker_by_inline },
-
+#endif +#endif
{ ngx_string("init_worker_by_lua"), { ngx_string("init_worker_by_lua"),
NGX_HTTP_MAIN_CONF|NGX_CONF_TAKE1, NGX_HTTP_MAIN_CONF|NGX_CONF_TAKE1,
ngx_http_lua_init_worker_by_lua, @@ -249,12 +253,14 @@ static ngx_command_t ngx_http_lua_cmds[]
@@ -209,6 +209,7 @@ static ngx_command_t ngx_http_lua_cmds[] 0,
(void *) ngx_http_lua_init_worker_by_file }, (void *) ngx_http_lua_init_worker_by_file },
+#ifndef NGX_LUA_NO_BY_LUA_BLOCK
{ ngx_string("exit_worker_by_lua_block"),
NGX_HTTP_MAIN_CONF|NGX_CONF_BLOCK|NGX_CONF_NOARGS,
ngx_http_lua_exit_worker_by_lua_block,
NGX_HTTP_MAIN_CONF_OFFSET,
0,
(void *) ngx_http_lua_exit_worker_by_inline },
+#endif
{ ngx_string("exit_worker_by_lua_file"),
NGX_HTTP_MAIN_CONF|NGX_CONF_TAKE1,
@@ -264,6 +270,7 @@ static ngx_command_t ngx_http_lua_cmds[]
(void *) ngx_http_lua_exit_worker_by_file },
#if defined(NDK) && NDK #if defined(NDK) && NDK
+#ifndef NGX_LUA_NO_BY_LUA_BLOCK +#ifndef NGX_LUA_NO_BY_LUA_BLOCK
/* set_by_lua $res { inline Lua code } [$arg1 [$arg2 [...]]] */ /* set_by_lua_block $res { inline Lua code } */
{ ngx_string("set_by_lua_block"), { ngx_string("set_by_lua_block"),
NGX_HTTP_SRV_CONF|NGX_HTTP_SIF_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF NGX_HTTP_SRV_CONF|NGX_HTTP_SIF_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
@@ -217,7 +218,7 @@ static ngx_command_t ngx_http_lua_cmds[] @@ -272,6 +279,7 @@ static ngx_command_t ngx_http_lua_cmds[]
NGX_HTTP_LOC_CONF_OFFSET, NGX_HTTP_LOC_CONF_OFFSET,
0, 0,
(void *) ngx_http_lua_filter_set_by_lua_inline }, (void *) ngx_http_lua_filter_set_by_lua_inline },
-
+#endif +#endif
/* set_by_lua $res <inline script> [$arg1 [$arg2 [...]]] */ /* set_by_lua $res <inline script> [$arg1 [$arg2 [...]]] */
{ ngx_string("set_by_lua"), { ngx_string("set_by_lua"),
NGX_HTTP_SRV_CONF|NGX_HTTP_SIF_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF @@ -292,6 +300,7 @@ static ngx_command_t ngx_http_lua_cmds[]
@@ -245,7 +246,7 @@ static ngx_command_t ngx_http_lua_cmds[] (void *) ngx_http_lua_filter_set_by_lua_file },
NGX_HTTP_LOC_CONF_OFFSET, #endif
+#ifndef NGX_LUA_NO_BY_LUA_BLOCK
/* server_rewrite_by_lua_block { <inline script> } */
{ ngx_string("server_rewrite_by_lua_block"),
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_CONF_BLOCK|NGX_CONF_NOARGS,
@@ -299,6 +308,7 @@ static ngx_command_t ngx_http_lua_cmds[]
NGX_HTTP_SRV_CONF_OFFSET,
0,
(void *) ngx_http_lua_server_rewrite_handler_inline },
+#endif
/* server_rewrite_by_lua_file filename; */
{ ngx_string("server_rewrite_by_lua_file"),
@@ -317,6 +327,7 @@ static ngx_command_t ngx_http_lua_cmds[]
0, 0,
(void *) ngx_http_lua_rewrite_handler_inline }, (void *) ngx_http_lua_rewrite_handler_inline },
-
+#ifndef NGX_LUA_NO_BY_LUA_BLOCK +#ifndef NGX_LUA_NO_BY_LUA_BLOCK
/* rewrite_by_lua_block { <inline script> } */ /* rewrite_by_lua_block { <inline script> } */
{ ngx_string("rewrite_by_lua_block"), { ngx_string("rewrite_by_lua_block"),
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
@@ -254,7 +255,7 @@ static ngx_command_t ngx_http_lua_cmds[] @@ -325,6 +336,7 @@ static ngx_command_t ngx_http_lua_cmds[]
NGX_HTTP_LOC_CONF_OFFSET, NGX_HTTP_LOC_CONF_OFFSET,
0, 0,
(void *) ngx_http_lua_rewrite_handler_inline }, (void *) ngx_http_lua_rewrite_handler_inline },
-
+#endif +#endif
/* access_by_lua "<inline script>" */ /* access_by_lua "<inline script>" */
{ ngx_string("access_by_lua"), { ngx_string("access_by_lua"),
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF @@ -335,6 +347,7 @@ static ngx_command_t ngx_http_lua_cmds[]
@@ -263,7 +264,7 @@ static ngx_command_t ngx_http_lua_cmds[]
NGX_HTTP_LOC_CONF_OFFSET,
0, 0,
(void *) ngx_http_lua_access_handler_inline }, (void *) ngx_http_lua_access_handler_inline },
-
+#ifndef NGX_LUA_NO_BY_LUA_BLOCK +#ifndef NGX_LUA_NO_BY_LUA_BLOCK
/* access_by_lua_block { <inline script> } */ /* access_by_lua_block { <inline script> } */
{ ngx_string("access_by_lua_block"), { ngx_string("access_by_lua_block"),
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
@@ -272,7 +273,7 @@ static ngx_command_t ngx_http_lua_cmds[] @@ -343,6 +356,7 @@ static ngx_command_t ngx_http_lua_cmds[]
NGX_HTTP_LOC_CONF_OFFSET, NGX_HTTP_LOC_CONF_OFFSET,
0, 0,
(void *) ngx_http_lua_access_handler_inline }, (void *) ngx_http_lua_access_handler_inline },
-
+#endif +#endif
/* content_by_lua "<inline script>" */ /* content_by_lua "<inline script>" */
{ ngx_string("content_by_lua"), { ngx_string("content_by_lua"),
NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF|NGX_CONF_TAKE1, @@ -352,6 +366,7 @@ static ngx_command_t ngx_http_lua_cmds[]
@@ -280,7 +281,7 @@ static ngx_command_t ngx_http_lua_cmds[]
NGX_HTTP_LOC_CONF_OFFSET,
0, 0,
(void *) ngx_http_lua_content_handler_inline }, (void *) ngx_http_lua_content_handler_inline },
-
+#ifndef NGX_LUA_NO_BY_LUA_BLOCK +#ifndef NGX_LUA_NO_BY_LUA_BLOCK
/* content_by_lua_block { <inline script> } */ /* content_by_lua_block { <inline script> } */
{ ngx_string("content_by_lua_block"), { ngx_string("content_by_lua_block"),
NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF|NGX_CONF_BLOCK|NGX_CONF_NOARGS, NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF|NGX_CONF_BLOCK|NGX_CONF_NOARGS,
@@ -288,7 +289,7 @@ static ngx_command_t ngx_http_lua_cmds[] @@ -359,6 +374,7 @@ static ngx_command_t ngx_http_lua_cmds[]
NGX_HTTP_LOC_CONF_OFFSET, NGX_HTTP_LOC_CONF_OFFSET,
0, 0,
(void *) ngx_http_lua_content_handler_inline }, (void *) ngx_http_lua_content_handler_inline },
-
+#endif +#endif
/* log_by_lua <inline script> */ /* log_by_lua <inline script> */
{ ngx_string("log_by_lua"), { ngx_string("log_by_lua"),
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF @@ -369,6 +385,7 @@ static ngx_command_t ngx_http_lua_cmds[]
@@ -297,7 +298,7 @@ static ngx_command_t ngx_http_lua_cmds[]
NGX_HTTP_LOC_CONF_OFFSET,
0, 0,
(void *) ngx_http_lua_log_handler_inline }, (void *) ngx_http_lua_log_handler_inline },
-
+#ifndef NGX_LUA_NO_BY_LUA_BLOCK +#ifndef NGX_LUA_NO_BY_LUA_BLOCK
/* log_by_lua_block { <inline script> } */ /* log_by_lua_block { <inline script> } */
{ ngx_string("log_by_lua_block"), { ngx_string("log_by_lua_block"),
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
@@ -306,7 +307,7 @@ static ngx_command_t ngx_http_lua_cmds[] @@ -377,6 +394,7 @@ static ngx_command_t ngx_http_lua_cmds[]
NGX_HTTP_LOC_CONF_OFFSET, NGX_HTTP_LOC_CONF_OFFSET,
0, 0,
(void *) ngx_http_lua_log_handler_inline }, (void *) ngx_http_lua_log_handler_inline },
-
+#endif +#endif
{ ngx_string("rewrite_by_lua_file"), { ngx_string("rewrite_by_lua_file"),
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
|NGX_CONF_TAKE1, @@ -433,6 +451,7 @@ static ngx_command_t ngx_http_lua_cmds[]
@@ -361,7 +362,7 @@ static ngx_command_t ngx_http_lua_cmds[]
NGX_HTTP_LOC_CONF_OFFSET,
0, 0,
(void *) ngx_http_lua_header_filter_inline }, (void *) ngx_http_lua_header_filter_inline },
-
+#ifndef NGX_LUA_NO_BY_LUA_BLOCK +#ifndef NGX_LUA_NO_BY_LUA_BLOCK
/* header_filter_by_lua_block { <inline script> } */ /* header_filter_by_lua_block { <inline script> } */
{ ngx_string("header_filter_by_lua_block"), { ngx_string("header_filter_by_lua_block"),
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
@@ -370,7 +371,7 @@ static ngx_command_t ngx_http_lua_cmds[] @@ -441,6 +460,7 @@ static ngx_command_t ngx_http_lua_cmds[]
NGX_HTTP_LOC_CONF_OFFSET, NGX_HTTP_LOC_CONF_OFFSET,
0, 0,
(void *) ngx_http_lua_header_filter_inline }, (void *) ngx_http_lua_header_filter_inline },
-
+#endif +#endif
{ ngx_string("header_filter_by_lua_file"), { ngx_string("header_filter_by_lua_file"),
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
|NGX_CONF_TAKE1, @@ -458,6 +478,7 @@ static ngx_command_t ngx_http_lua_cmds[]
@@ -386,7 +387,7 @@ static ngx_command_t ngx_http_lua_cmds[]
NGX_HTTP_LOC_CONF_OFFSET,
0, 0,
(void *) ngx_http_lua_body_filter_inline }, (void *) ngx_http_lua_body_filter_inline },
-
+#ifndef NGX_LUA_NO_BY_LUA_BLOCK +#ifndef NGX_LUA_NO_BY_LUA_BLOCK
/* body_filter_by_lua_block { <inline script> } */ /* body_filter_by_lua_block { <inline script> } */
{ ngx_string("body_filter_by_lua_block"), { ngx_string("body_filter_by_lua_block"),
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
@@ -395,7 +396,7 @@ static ngx_command_t ngx_http_lua_cmds[] @@ -466,6 +487,7 @@ static ngx_command_t ngx_http_lua_cmds[]
NGX_HTTP_LOC_CONF_OFFSET, NGX_HTTP_LOC_CONF_OFFSET,
0, 0,
(void *) ngx_http_lua_body_filter_inline }, (void *) ngx_http_lua_body_filter_inline },
-
+#endif +#endif
{ ngx_string("body_filter_by_lua_file"), { ngx_string("body_filter_by_lua_file"),
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
|NGX_CONF_TAKE1, @@ -475,12 +497,14 @@ static ngx_command_t ngx_http_lua_cmds[]
@@ -403,14 +404,14 @@ static ngx_command_t ngx_http_lua_cmds[]
NGX_HTTP_LOC_CONF_OFFSET,
0, 0,
(void *) ngx_http_lua_body_filter_file }, (void *) ngx_http_lua_body_filter_file },
-
+#ifndef NGX_LUA_NO_BY_LUA_BLOCK +#ifndef NGX_LUA_NO_BY_LUA_BLOCK
{ ngx_string("balancer_by_lua_block"), { ngx_string("balancer_by_lua_block"),
NGX_HTTP_UPS_CONF|NGX_CONF_BLOCK|NGX_CONF_NOARGS, NGX_HTTP_UPS_CONF|NGX_CONF_BLOCK|NGX_CONF_NOARGS,
@ -171,16 +184,29 @@
NGX_HTTP_SRV_CONF_OFFSET, NGX_HTTP_SRV_CONF_OFFSET,
0, 0,
(void *) ngx_http_lua_balancer_handler_inline }, (void *) ngx_http_lua_balancer_handler_inline },
-
+#endif +#endif
{ ngx_string("balancer_by_lua_file"), { ngx_string("balancer_by_lua_file"),
NGX_HTTP_UPS_CONF|NGX_CONF_TAKE1, NGX_HTTP_UPS_CONF|NGX_CONF_TAKE1,
ngx_http_lua_balancer_by_lua, @@ -585,12 +609,14 @@ static ngx_command_t ngx_http_lua_cmds[]
@@ -517,14 +518,14 @@ static ngx_command_t ngx_http_lua_cmds[]
NGX_HTTP_LOC_CONF_OFFSET,
offsetof(ngx_http_lua_loc_conf_t, ssl_ciphers), offsetof(ngx_http_lua_loc_conf_t, ssl_ciphers),
NULL }, NULL },
-
+#ifndef NGX_LUA_NO_BY_LUA_BLOCK
{ ngx_string("ssl_client_hello_by_lua_block"),
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_CONF_BLOCK|NGX_CONF_NOARGS,
ngx_http_lua_ssl_client_hello_by_lua_block,
NGX_HTTP_SRV_CONF_OFFSET,
0,
(void *) ngx_http_lua_ssl_client_hello_handler_inline },
+#endif
{ ngx_string("ssl_client_hello_by_lua_file"),
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_CONF_TAKE1,
@@ -599,12 +625,14 @@ static ngx_command_t ngx_http_lua_cmds[]
0,
(void *) ngx_http_lua_ssl_client_hello_handler_file },
+#ifndef NGX_LUA_NO_BY_LUA_BLOCK +#ifndef NGX_LUA_NO_BY_LUA_BLOCK
{ ngx_string("ssl_certificate_by_lua_block"), { ngx_string("ssl_certificate_by_lua_block"),
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_CONF_BLOCK|NGX_CONF_NOARGS, NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_CONF_BLOCK|NGX_CONF_NOARGS,
@ -188,8 +214,37 @@
NGX_HTTP_SRV_CONF_OFFSET, NGX_HTTP_SRV_CONF_OFFSET,
0, 0,
(void *) ngx_http_lua_ssl_cert_handler_inline }, (void *) ngx_http_lua_ssl_cert_handler_inline },
-
+#endif +#endif
{ ngx_string("ssl_certificate_by_lua_file"), { ngx_string("ssl_certificate_by_lua_file"),
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_CONF_TAKE1, NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_CONF_TAKE1,
ngx_http_lua_ssl_cert_by_lua, @@ -613,12 +641,14 @@ static ngx_command_t ngx_http_lua_cmds[]
0,
(void *) ngx_http_lua_ssl_cert_handler_file },
+#ifndef NGX_LUA_NO_BY_LUA_BLOCK
{ ngx_string("ssl_session_store_by_lua_block"),
NGX_HTTP_MAIN_CONF|NGX_CONF_BLOCK|NGX_CONF_NOARGS,
ngx_http_lua_ssl_sess_store_by_lua_block,
NGX_HTTP_SRV_CONF_OFFSET,
0,
(void *) ngx_http_lua_ssl_sess_store_handler_inline },
+#endif
{ ngx_string("ssl_session_store_by_lua_file"),
NGX_HTTP_MAIN_CONF|NGX_CONF_TAKE1,
@@ -627,12 +657,14 @@ static ngx_command_t ngx_http_lua_cmds[]
0,
(void *) ngx_http_lua_ssl_sess_store_handler_file },
+#ifndef NGX_LUA_NO_BY_LUA_BLOCK
{ ngx_string("ssl_session_fetch_by_lua_block"),
NGX_HTTP_MAIN_CONF|NGX_CONF_BLOCK|NGX_CONF_NOARGS,
ngx_http_lua_ssl_sess_fetch_by_lua_block,
NGX_HTTP_SRV_CONF_OFFSET,
0,
(void *) ngx_http_lua_ssl_sess_fetch_handler_inline },
+#endif
{ ngx_string("ssl_session_fetch_by_lua_file"),
NGX_HTTP_MAIN_CONF|NGX_CONF_TAKE1,