diff src/http/ngx_http_request.h @ 9275:199dc0d6b05b

Added max_headers directive. The directive limits the number of request headers accepted from clients. While the total amount of headers is believed to be sufficiently limited by the existing buffer size limits (client_header_buffer_size and large_client_header_buffers), the additional limit on the number of headers might be beneficial to better protect backend servers. Requested by Maksim Yevmenkin.
author Maxim Dounin <mdounin@mdounin.ru>
date Fri, 24 May 2024 00:20:01 +0300
parents f798ecafec05
children e46e1ea89ccd
line wrap: on
line diff
--- a/src/http/ngx_http_request.h	Wed May 15 10:06:00 2024 +0300
+++ b/src/http/ngx_http_request.h	Fri May 24 00:20:01 2024 +0300
@@ -182,6 +182,7 @@
 
 typedef struct {
     ngx_list_t                        headers;
+    ngx_uint_t                        count;
 
     ngx_table_elt_t                  *host;
     ngx_table_elt_t                  *connection;