Skip to content

Commit

Permalink
Load module earlier, at server-rewrite phase. (opentracing-contrib#85)
Browse files Browse the repository at this point in the history
Subrequests begin their lives in the server-rewrite phase, so this
module is still loaded for subrequests.
  • Loading branch information
terrynsun committed May 14, 2019
1 parent b56c1a9 commit e0a9a72
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion opentracing/src/ngx_http_opentracing_module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ static ngx_int_t opentracing_module_init(ngx_conf_t *cf) noexcept {

// Add handlers to create tracing data.
auto handler = static_cast<ngx_http_handler_pt *>(ngx_array_push(
&core_main_config->phases[NGX_HTTP_PREACCESS_PHASE].handlers));
&core_main_config->phases[NGX_HTTP_SERVER_REWRITE_PHASE].handlers));
if (handler == nullptr) return NGX_ERROR;
*handler = on_enter_block;

Expand Down

0 comments on commit e0a9a72

Please sign in to comment.