diff --git a/src/ngx_http_modsecurity_rewrite.c b/src/ngx_http_modsecurity_rewrite.c index 926cf70..8fe1dfa 100644 --- a/src/ngx_http_modsecurity_rewrite.c +++ b/src/ngx_http_modsecurity_rewrite.c @@ -134,10 +134,15 @@ ngx_http_modsecurity_rewrite_handler(ngx_http_request_t *r) case NGX_HTTP_VERSION_11 : http_version = "1.1"; break; -#if defined(nginx_version) && nginx_version >= 1009005 +#ifdef NGX_HTTP_VERSION_20 case NGX_HTTP_VERSION_20 : http_version = "2.0"; break; +#endif +#ifdef NGX_HTTP_VERSION_30 + case NGX_HTTP_VERSION_30 : + http_version = "3.0"; + break; #endif default : http_version = ngx_str_to_char(r->http_protocol, r->pool);