Skip to content

Commit cd63e40

Browse files
authored
Moving ngx_http_modsecurity_rewrite_handler to access as well
1 parent f5c3ebc commit cd63e40

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/ngx_http_modsecurity_module.c

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -565,17 +565,14 @@ ngx_http_modsecurity_init(ngx_conf_t *cf)
565565
}
566566
/**
567567
*
568-
* Seems like we cannot do this very same thing with
569-
* NGX_HTTP_FIND_CONFIG_PHASE. it does not seems to
570-
* be an array. Our next option is the REWRITE.
571-
*
572-
* TODO: check if we can hook prior to NGX_HTTP_REWRITE_PHASE phase.
568+
* We want to process everything in the NGX_HTTP_ACCESS_PHASE because we need to allow
569+
* ngx_http_limit_*_module to run
573570
*
574571
*/
575-
h_rewrite = ngx_array_push(&cmcf->phases[NGX_HTTP_REWRITE_PHASE].handlers);
572+
h_rewrite = ngx_array_push(&cmcf->phases[NGX_HTTP_ACCESS_PHASE].handlers);
576573
if (h_rewrite == NULL)
577574
{
578-
dd("Not able to create a new NGX_HTTP_REWRITE_PHASE handle");
575+
dd("Not able to create a new NGX_HTTP_ACCESS_PHASE handle");
579576
return NGX_ERROR;
580577
}
581578
*h_rewrite = ngx_http_modsecurity_rewrite_handler;

0 commit comments

Comments
 (0)