do not use a cache headers set to hide
diff --git a/src/http/modules/ngx_http_fastcgi_module.c b/src/http/modules/ngx_http_fastcgi_module.c
index 36967e9..16d2bf8 100644
--- a/src/http/modules/ngx_http_fastcgi_module.c
+++ b/src/http/modules/ngx_http_fastcgi_module.c
@@ -515,19 +515,6 @@
#if (NGX_HTTP_CACHE)
-static ngx_str_t ngx_http_fastcgi_hide_cache_headers[] = {
- ngx_string("Status"),
- ngx_string("X-Accel-Expires"),
- ngx_string("X-Accel-Redirect"),
- ngx_string("X-Accel-Limit-Rate"),
- ngx_string("X-Accel-Buffering"),
- ngx_string("X-Accel-Charset"),
- ngx_string("Set-Cookie"),
- ngx_string("P3P"),
- ngx_null_string
-};
-
-
static ngx_keyval_t ngx_http_fastcgi_cache_headers[] = {
{ ngx_string("HTTP_IF_MODIFIED_SINCE"), ngx_string("") },
{ ngx_string("HTTP_IF_UNMODIFIED_SINCE"), ngx_string("") },
@@ -2025,7 +2012,6 @@
u_char *p;
size_t size;
uintptr_t *code;
- ngx_str_t *hide;
ngx_uint_t i;
ngx_array_t headers_names;
ngx_keyval_t *src;
@@ -2251,18 +2237,8 @@
hash.bucket_size = ngx_align(64, ngx_cacheline_size);
hash.name = "fastcgi_hide_headers_hash";
-#if (NGX_HTTP_CACHE)
-
- hide = conf->upstream.cache ? ngx_http_fastcgi_hide_cache_headers:
- ngx_http_fastcgi_hide_headers;
-#else
-
- hide = ngx_http_fastcgi_hide_headers;
-
-#endif
-
if (ngx_http_upstream_hide_headers_hash(cf, &conf->upstream,
- &prev->upstream, hide, &hash)
+ &prev->upstream, ngx_http_fastcgi_hide_headers, &hash)
!= NGX_OK)
{
return NGX_CONF_ERROR;
diff --git a/src/http/modules/ngx_http_proxy_module.c b/src/http/modules/ngx_http_proxy_module.c
index ff11d46..fcae88e 100644
--- a/src/http/modules/ngx_http_proxy_module.c
+++ b/src/http/modules/ngx_http_proxy_module.c
@@ -512,21 +512,6 @@
{ ngx_null_string, ngx_null_string }
};
-
-static ngx_str_t ngx_http_proxy_hide_cache_headers[] = {
- ngx_string("Date"),
- ngx_string("Server"),
- ngx_string("X-Pad"),
- ngx_string("X-Accel-Expires"),
- ngx_string("X-Accel-Redirect"),
- ngx_string("X-Accel-Limit-Rate"),
- ngx_string("X-Accel-Buffering"),
- ngx_string("X-Accel-Charset"),
- ngx_string("Set-Cookie"),
- ngx_string("P3P"),
- ngx_null_string
-};
-
#endif
@@ -1725,7 +1710,6 @@
ngx_http_proxy_loc_conf_t *conf = child;
size_t size;
- ngx_str_t *h;
ngx_keyval_t *s;
ngx_hash_init_t hash;
ngx_http_proxy_redirect_t *pr;
@@ -2009,18 +1993,8 @@
hash.bucket_size = conf->headers_hash_bucket_size;
hash.name = "proxy_headers_hash";
-#if (NGX_HTTP_CACHE)
-
- h = conf->upstream.cache ? ngx_http_proxy_hide_cache_headers:
- ngx_http_proxy_hide_headers;
-#else
-
- h = ngx_http_proxy_hide_headers;
-
-#endif
-
if (ngx_http_upstream_hide_headers_hash(cf, &conf->upstream,
- &prev->upstream, h, &hash)
+ &prev->upstream, ngx_http_proxy_hide_headers, &hash)
!= NGX_OK)
{
return NGX_CONF_ERROR;
diff --git a/src/http/modules/ngx_http_scgi_module.c b/src/http/modules/ngx_http_scgi_module.c
index fe4fb47..c6d848e 100644
--- a/src/http/modules/ngx_http_scgi_module.c
+++ b/src/http/modules/ngx_http_scgi_module.c
@@ -337,19 +337,6 @@
#if (NGX_HTTP_CACHE)
-static ngx_str_t ngx_http_scgi_hide_cache_headers[] = {
- ngx_string("Status"),
- ngx_string("X-Accel-Expires"),
- ngx_string("X-Accel-Redirect"),
- ngx_string("X-Accel-Limit-Rate"),
- ngx_string("X-Accel-Buffering"),
- ngx_string("X-Accel-Charset"),
- ngx_string("Set-Cookie"),
- ngx_string("P3P"),
- ngx_null_string
-};
-
-
static ngx_keyval_t ngx_http_scgi_cache_headers[] = {
{ ngx_string("HTTP_IF_MODIFIED_SINCE"), ngx_string("") },
{ ngx_string("HTTP_IF_UNMODIFIED_SINCE"), ngx_string("") },
@@ -1052,7 +1039,6 @@
u_char *p;
size_t size;
uintptr_t *code;
- ngx_str_t *hide;
ngx_uint_t i;
ngx_array_t headers_names;
ngx_keyval_t *src;
@@ -1271,18 +1257,8 @@
hash.bucket_size = ngx_align(64, ngx_cacheline_size);
hash.name = "scgi_hide_headers_hash";
-#if (NGX_HTTP_CACHE)
-
- hide = conf->upstream.cache ? ngx_http_scgi_hide_cache_headers:
- ngx_http_scgi_hide_headers;
-#else
-
- hide = ngx_http_scgi_hide_headers;
-
-#endif
-
if (ngx_http_upstream_hide_headers_hash(cf, &conf->upstream,
- &prev->upstream, hide, &hash)
+ &prev->upstream, ngx_http_scgi_hide_headers, &hash)
!= NGX_OK)
{
return NGX_CONF_ERROR;
diff --git a/src/http/modules/ngx_http_uwsgi_module.c b/src/http/modules/ngx_http_uwsgi_module.c
index 8bf3c8b..466d34b 100644
--- a/src/http/modules/ngx_http_uwsgi_module.c
+++ b/src/http/modules/ngx_http_uwsgi_module.c
@@ -370,18 +370,6 @@
#if (NGX_HTTP_CACHE)
-static ngx_str_t ngx_http_uwsgi_hide_cache_headers[] = {
- ngx_string("X-Accel-Expires"),
- ngx_string("X-Accel-Redirect"),
- ngx_string("X-Accel-Limit-Rate"),
- ngx_string("X-Accel-Buffering"),
- ngx_string("X-Accel-Charset"),
- ngx_string("Set-Cookie"),
- ngx_string("P3P"),
- ngx_null_string
-};
-
-
static ngx_keyval_t ngx_http_uwsgi_cache_headers[] = {
{ ngx_string("HTTP_IF_MODIFIED_SINCE"), ngx_string("") },
{ ngx_string("HTTP_IF_UNMODIFIED_SINCE"), ngx_string("") },
@@ -1104,7 +1092,6 @@
u_char *p;
size_t size;
uintptr_t *code;
- ngx_str_t *hide;
ngx_uint_t i;
ngx_array_t headers_names;
ngx_keyval_t *src;
@@ -1325,18 +1312,8 @@
hash.bucket_size = ngx_align(64, ngx_cacheline_size);
hash.name = "uwsgi_hide_headers_hash";
-#if (NGX_HTTP_CACHE)
-
- hide = conf->upstream.cache ? ngx_http_uwsgi_hide_cache_headers:
- ngx_http_uwsgi_hide_headers;
-#else
-
- hide = ngx_http_uwsgi_hide_headers;
-
-#endif
-
if (ngx_http_upstream_hide_headers_hash(cf, &conf->upstream,
- &prev->upstream, hide, &hash)
+ &prev->upstream, ngx_http_uwsgi_hide_headers, &hash)
!= NGX_OK)
{
return NGX_CONF_ERROR;