1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-16 12:45:18 +03:00
aports/testing/nginx-naxsi/anonymise.patch
Stuart Cardall 89e1b4d920 testing/nginx-naxsi: => 1.11.10 / naxsi 0.55.3 / use supervise-daemon
* initd now uses supervise-daemon for service supervision
* removes duplicate --with-http_realip_module
* removes scgi_params & uwsgi_params as the servers are disabled
2017-03-21 12:59:42 +01:00

75 lines
2.3 KiB
Diff

--- nginx-1.11.10/src/http/ngx_http_header_filter_module.c
+++ nginx-1.11.10/src/http/ngx_http_header_filter_module.c.new
@@ -46,9 +46,9 @@
};
-static u_char ngx_http_server_string[] = "Server: nginx" CRLF;
-static u_char ngx_http_server_full_string[] = "Server: " NGINX_VER CRLF;
-static u_char ngx_http_server_build_string[] = "Server: " NGINX_VER_BUILD CRLF;
+static u_char ngx_http_server_string[] = "";
+static u_char ngx_http_server_full_string[] = "";
+static u_char ngx_http_server_build_string[] = "";
static ngx_str_t ngx_http_status_lines[] = {
@@ -276,10 +276,10 @@
if (r->headers_out.server == NULL) {
if (clcf->server_tokens == NGX_HTTP_SERVER_TOKENS_ON) {
- len += sizeof(ngx_http_server_full_string) - 1;
+ len += sizeof(ngx_http_server_full_string) - 0;
} else if (clcf->server_tokens == NGX_HTTP_SERVER_TOKENS_BUILD) {
- len += sizeof(ngx_http_server_build_string) - 1;
+ len += sizeof(ngx_http_server_build_string) - 0;
} else {
len += sizeof(ngx_http_server_string) - 1;
--- nginx-1.11.10/src/http/ngx_http_special_response.c
+++ nginx-1.11.10/src/http/ngx_http_special_response.c.new
@@ -19,21 +19,21 @@
static u_char ngx_http_error_full_tail[] =
-"<hr><center>" NGINX_VER "</center>" CRLF
+"<hr><center>127.0.0.1</center>" CRLF
"</body>" CRLF
"</html>" CRLF
;
static u_char ngx_http_error_build_tail[] =
-"<hr><center>" NGINX_VER_BUILD "</center>" CRLF
+"<hr><center>1.0.0</center>" CRLF
"</body>" CRLF
"</html>" CRLF
;
static u_char ngx_http_error_tail[] =
-"<hr><center>nginx</center>" CRLF
+"<hr><center>localhost</center>" CRLF
"</body>" CRLF
"</html>" CRLF
;
--- nginx-1.11.10/src/http/v2/ngx_http_v2_filter_module.c
+++ nginx-1.11.10/src/http/v2/ngx_http_v2_filter_module.c.new
@@ -236,16 +236,7 @@
clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);
if (r->headers_out.server == NULL) {
-
- if (clcf->server_tokens == NGX_HTTP_SERVER_TOKENS_ON) {
- len += 1 + nginx_ver_len;
-
- } else if (clcf->server_tokens == NGX_HTTP_SERVER_TOKENS_BUILD) {
- len += 1 + nginx_ver_build_len;
-
- } else {
- len += 1 + sizeof(nginx);
- }
+ len += 1 + sizeof(nginx);
}
if (r->headers_out.date == NULL) {