Skip to content

Commit 834d51b

Browse files
committed
Use access phase (post access does not exists)
1 parent 6f67162 commit 834d51b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ngx_http_redirectionio_module.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ static ngx_int_t ngx_http_redirectionio_postconfiguration(ngx_conf_t *cf) {
137137

138138
*log_handler = ngx_http_redirectionio_log_handler;
139139

140-
redirect_handler = ngx_array_push(&cmcf->phases[NGX_HTTP_POST_ACCESS_PHASE].handlers);
140+
redirect_handler = ngx_array_push(&cmcf->phases[NGX_HTTP_ACCESS_PHASE].handlers);
141141

142142
if (redirect_handler == NULL) {
143143
ngx_log_debug0(NGX_LOG_DEBUG_HTTP, cf->cycle->log, 0, "redirectionio: init(): error pushing redirect handler");
@@ -147,7 +147,7 @@ static ngx_int_t ngx_http_redirectionio_postconfiguration(ngx_conf_t *cf) {
147147
*redirect_handler = ngx_http_redirectionio_redirect_handler;
148148

149149
// Create context handler -> pre access phase
150-
create_ctx_handler = ngx_array_push(&cmcf->phases[NGX_HTTP_POST_ACCESS_PHASE].handlers);
150+
create_ctx_handler = ngx_array_push(&cmcf->phases[NGX_HTTP_ACCESS_PHASE].handlers);
151151

152152
if (create_ctx_handler == NULL) {
153153
ngx_log_debug0(NGX_LOG_DEBUG_HTTP, cf->cycle->log, 0, "redirectionio: init(): error pushing ctx handler");

0 commit comments

Comments
 (0)