Skip to content

Commit

Permalink
style clean
Browse files Browse the repository at this point in the history
  • Loading branch information
chronolaw committed Oct 10, 2023
1 parent 02a2961 commit bed6db6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 16 deletions.
25 changes: 10 additions & 15 deletions src/ngx_http_lua_kong_request_id.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
{
Expand Down
2 changes: 1 addition & 1 deletion src/ngx_http_lua_kong_var.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit bed6db6

Please sign in to comment.