diff --git a/src/ngx_postgres_util.c b/src/ngx_postgres_util.c index f13c90a..75dd30e 100644 --- a/src/ngx_postgres_util.c +++ b/src/ngx_postgres_util.c @@ -375,6 +375,9 @@ ngx_postgres_rewrite_value(ngx_conf_t *cf, ngx_postgres_rewrite_loc_conf_t *lcf, ngx_http_script_compile_t sc; ngx_http_script_value_code_t *val; ngx_http_script_complex_value_code_t *complex; +#if (nginx_version >= 1031003) + ngx_http_script_complex_value_end_code_t *complex_end; +#endif n = ngx_http_script_variables_count(value); @@ -421,5 +424,16 @@ ngx_postgres_rewrite_value(ngx_conf_t *cf, ngx_postgres_rewrite_loc_conf_t *lcf, return NGX_CONF_ERROR; } +#if (nginx_version >= 1031003) + complex_end = ngx_http_script_add_code(lcf->codes, + sizeof(ngx_http_script_complex_value_end_code_t), + &complex); + if (complex_end == NULL) { + return NGX_CONF_ERROR; + } + + complex_end->code = ngx_http_script_complex_value_end_code; +#endif + return NGX_CONF_OK; }