diff --git a/src/ngx_http_lua_kong_request_id.c b/src/ngx_http_lua_kong_request_id.c index 51ede7ca..67effcae 100644 --- a/src/ngx_http_lua_kong_request_id.c +++ b/src/ngx_http_lua_kong_request_id.c @@ -22,21 +22,6 @@ #define KONG_REQUEST_ID_FORMAT "%08x%08x%08x%08x" -static ngx_int_t -ngx_http_lua_kong_variable_request_id(ngx_http_request_t *r, - ngx_http_variable_value_t *v, uintptr_t data); - - -static ngx_http_variable_t ngx_http_lua_kong_variables[] = { - - { ngx_string("kong_request_id"), NULL, - ngx_http_lua_kong_variable_request_id, - 0, 0, 0 }, - - ngx_http_null_variable -}; - - static ngx_int_t ngx_http_lua_kong_variable_request_id(ngx_http_request_t *r, ngx_http_variable_value_t *v, uintptr_t data) @@ -63,6 +48,16 @@ ngx_http_lua_kong_variable_request_id(ngx_http_request_t *r, } +static ngx_http_variable_t ngx_http_lua_kong_variables[] = { + + { ngx_string("kong_request_id"), NULL, + ngx_http_lua_kong_variable_request_id, + 0, 0, 0 }, + + ngx_http_null_variable +}; + + ngx_int_t ngx_http_lua_kong_add_vars(ngx_conf_t *cf) { diff --git a/src/ngx_http_lua_kong_var.c b/src/ngx_http_lua_kong_var.c index 4152f1fe..eb9a8c29 100644 --- a/src/ngx_http_lua_kong_var.c +++ b/src/ngx_http_lua_kong_var.c @@ -86,7 +86,7 @@ static ngx_str_t default_vars[] = { ngx_string("upstream_http_upgrade"), ngx_string("upstream_status"), - /* lua-kong-module vars*/ + /* lua-kong-module vars */ ngx_string("kong_request_id"), ngx_null_string