Skip to content

Commit b5ea638

Browse files
committed
Removes the limitation for the allowed methods
1 parent 4f153f4 commit b5ea638

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/ngx_http_modsecurity_log.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,14 @@ ngx_http_modsecurity_log_handler(ngx_http_request_t *r)
8383
return NGX_OK;
8484
}
8585

86+
/*
8687
if (r->method != NGX_HTTP_GET &&
8788
r->method != NGX_HTTP_POST && r->method != NGX_HTTP_HEAD) {
8889
dd("ModSecurity is not ready to deal with anything different from " \
8990
"POST, GET or HEAD");
9091
return NGX_OK;
9192
}
92-
93+
*/
9394
ctx = ngx_http_get_module_ctx(r, ngx_http_modsecurity_module);
9495

9596
dd("recovering ctx: %p", ctx);

src/ngx_http_modsecurity_rewrite.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,14 @@ ngx_http_modsecurity_rewrite_handler(ngx_http_request_t *r)
3232
return NGX_DECLINED;
3333
}
3434

35+
/*
3536
if (r->method != NGX_HTTP_GET &&
3637
r->method != NGX_HTTP_POST && r->method != NGX_HTTP_HEAD) {
3738
dd("ModSecurity is not ready to deal with anything different from " \
3839
"POST, GET or HEAD");
3940
return NGX_DECLINED;
4041
}
42+
*/
4143

4244
dd("catching a new _rewrite_ phase handler");
4345

@@ -163,6 +165,7 @@ ngx_http_modsecurity_rewrite_handler(ngx_http_request_t *r)
163165
*
164166
*/
165167

168+
dd("Adding request header: %.*s with value %.*s", (int)data[i].key.len, data[i].key.data, (int) data[i].value.len, data[i].value.data);
166169
msc_add_n_request_header(ctx->modsec_transaction,
167170
(const unsigned char *) data[i].key.data,
168171
data[i].key.len,

0 commit comments

Comments
 (0)