summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBarracuda Team2014-07-01 22:06:40 (GMT)
committerBarracuda Team2014-07-01 22:06:40 (GMT)
commit05c7c0f00ef4a19880d649e161a2047c872da6b4 (patch)
tree905ee796af3c2818bd6ca1315a7351aa94cd075d
parent94b78e58b8ed9390a74c05736d21789f2a1f57af (diff)
Nginx: Send Boost compatible Cache-Control headers also with Speed Booster active.
This is to mimic Drupal core behaviour when full-page cache is disabled, even if it is not really disabled via disable_drupal_page_cache INI variable. Note that Speed Booster continues to ignore Cache-Control headers sent by Drupal backend, as before, to force its own TTL set via speed_booster_anon_cache_ttl INI variable or in the custom local.settings.php code.
-rw-r--r--http/Provision/Service/http/nginx_legacy_include.conf6
-rw-r--r--http/Provision/Service/http/nginx_modern_include.conf6
-rw-r--r--http/Provision/Service/http/nginx_octopus_include.conf6
3 files changed, 12 insertions, 6 deletions
diff --git a/http/Provision/Service/http/nginx_legacy_include.conf b/http/Provision/Service/http/nginx_legacy_include.conf
index ba4db45..304a0ea 100644
--- a/http/Provision/Service/http/nginx_legacy_include.conf
+++ b/http/Provision/Service/http/nginx_legacy_include.conf
@@ -655,7 +655,7 @@ location ~* \.xml$ {
error_page 405 = @drupal;
access_log off;
add_header Expires "Tue, 24 Jan 1984 08:00:00 GMT";
- add_header Cache-Control "must-revalidate, post-check=0, pre-check=0";
+ add_header Cache-Control "no-store, no-cache, must-revalidate, post-check=0, pre-check=0";
add_header X-Header "Boost Citrus 2.4";
charset utf-8;
types { }
@@ -730,6 +730,7 @@ location ~ ^/(?<esi>esi/.*)"$ {
add_header X-GeoIP-Country-Name "$geoip_country_name";
add_header X-This-Proto "$http_x_forwarded_proto";
add_header X-Server-Name "$server_name";
+ add_header Cache-Control "no-store, no-cache, must-revalidate, post-check=0, pre-check=0";
###
### Set correct, local $uri.
###
@@ -804,7 +805,7 @@ location @cache {
}
error_page 405 = @drupal;
add_header Expires "Tue, 24 Jan 1984 08:00:00 GMT";
- add_header Cache-Control "must-revalidate, post-check=0, pre-check=0";
+ add_header Cache-Control "no-store, no-cache, must-revalidate, post-check=0, pre-check=0";
add_header X-Header "Boost Citrus 1.9";
charset utf-8;
try_files /cache/normal/$host${uri}_$args.html @drupal;
@@ -852,6 +853,7 @@ location = /index.php {
add_header X-GeoIP-Country-Name "$geoip_country_name";
add_header X-This-Proto "$http_x_forwarded_proto";
add_header X-Server-Name "$server_name";
+ add_header Cache-Control "no-store, no-cache, must-revalidate, post-check=0, pre-check=0";
tcp_nopush off;
keepalive_requests 0;
try_files $uri =404; ### check for existence of php file first
diff --git a/http/Provision/Service/http/nginx_modern_include.conf b/http/Provision/Service/http/nginx_modern_include.conf
index f1869ff..f1b881f 100644
--- a/http/Provision/Service/http/nginx_modern_include.conf
+++ b/http/Provision/Service/http/nginx_modern_include.conf
@@ -729,7 +729,7 @@ location ~* \.xml$ {
error_page 405 = @drupal;
access_log off;
add_header Expires "Tue, 24 Jan 1984 08:00:00 GMT";
- add_header Cache-Control "must-revalidate, post-check=0, pre-check=0";
+ add_header Cache-Control "no-store, no-cache, must-revalidate, post-check=0, pre-check=0";
add_header X-Header "Boost Citrus 2.4";
charset utf-8;
types { }
@@ -804,6 +804,7 @@ location ~ ^/(?<esi>esi/.*)"$ {
add_header X-GeoIP-Country-Name "$geoip_country_name";
add_header X-This-Proto "$http_x_forwarded_proto";
add_header X-Server-Name "$server_name";
+ add_header Cache-Control "no-store, no-cache, must-revalidate, post-check=0, pre-check=0";
###
### Set correct, local $uri.
###
@@ -878,7 +879,7 @@ location @cache {
}
error_page 405 = @drupal;
add_header Expires "Tue, 24 Jan 1984 08:00:00 GMT";
- add_header Cache-Control "must-revalidate, post-check=0, pre-check=0";
+ add_header Cache-Control "no-store, no-cache, must-revalidate, post-check=0, pre-check=0";
add_header X-Header "Boost Citrus 1.9";
charset utf-8;
try_files /cache/normal/$host${uri}_$args.html @drupal;
@@ -926,6 +927,7 @@ location = /index.php {
add_header X-GeoIP-Country-Name "$geoip_country_name";
add_header X-This-Proto "$http_x_forwarded_proto";
add_header X-Server-Name "$server_name";
+ add_header Cache-Control "no-store, no-cache, must-revalidate, post-check=0, pre-check=0";
tcp_nopush off;
keepalive_requests 0;
try_files $uri =404; ### check for existence of php file first
diff --git a/http/Provision/Service/http/nginx_octopus_include.conf b/http/Provision/Service/http/nginx_octopus_include.conf
index 13ae15c..ae63bad 100644
--- a/http/Provision/Service/http/nginx_octopus_include.conf
+++ b/http/Provision/Service/http/nginx_octopus_include.conf
@@ -716,7 +716,7 @@ location ~* \.xml$ {
error_page 405 = @drupal;
access_log off;
add_header Expires "Tue, 24 Jan 1984 08:00:00 GMT";
- add_header Cache-Control "must-revalidate, post-check=0, pre-check=0";
+ add_header Cache-Control "no-store, no-cache, must-revalidate, post-check=0, pre-check=0";
add_header X-Header "Boost Citrus 2.4";
charset utf-8;
types { }
@@ -791,6 +791,7 @@ location ~ ^/(?<esi>esi/.*)"$ {
add_header X-GeoIP-Country-Name "$geoip_country_name";
add_header X-This-Proto "$http_x_forwarded_proto";
add_header X-Server-Name "$server_name";
+ add_header Cache-Control "no-store, no-cache, must-revalidate, post-check=0, pre-check=0";
###
### Set correct, local $uri.
###
@@ -865,7 +866,7 @@ location @cache {
}
error_page 405 = @drupal;
add_header Expires "Tue, 24 Jan 1984 08:00:00 GMT";
- add_header Cache-Control "must-revalidate, post-check=0, pre-check=0";
+ add_header Cache-Control "no-store, no-cache, must-revalidate, post-check=0, pre-check=0";
add_header X-Header "Boost Citrus 1.9";
charset utf-8;
try_files /cache/normal/$host${uri}_$args.html @drupal;
@@ -913,6 +914,7 @@ location = /index.php {
add_header X-GeoIP-Country-Name "$geoip_country_name";
add_header X-This-Proto "$http_x_forwarded_proto";
add_header X-Server-Name "$server_name";
+ add_header Cache-Control "no-store, no-cache, must-revalidate, post-check=0, pre-check=0";
tcp_nopush off;
keepalive_requests 0;
try_files $uri =404; ### check for existence of php file first