Commit 05c7c0f0 authored by omega8cc's avatar omega8cc

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.
parent 94b78e58
...@@ -655,7 +655,7 @@ location ~* \.xml$ { ...@@ -655,7 +655,7 @@ location ~* \.xml$ {
error_page 405 = @drupal; error_page 405 = @drupal;
access_log off; access_log off;
add_header Expires "Tue, 24 Jan 1984 08:00:00 GMT"; 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"; add_header X-Header "Boost Citrus 2.4";
charset utf-8; charset utf-8;
types { } types { }
...@@ -730,6 +730,7 @@ location ~ ^/(?<esi>esi/.*)"$ { ...@@ -730,6 +730,7 @@ location ~ ^/(?<esi>esi/.*)"$ {
add_header X-GeoIP-Country-Name "$geoip_country_name"; add_header X-GeoIP-Country-Name "$geoip_country_name";
add_header X-This-Proto "$http_x_forwarded_proto"; add_header X-This-Proto "$http_x_forwarded_proto";
add_header X-Server-Name "$server_name"; 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. ### Set correct, local $uri.
### ###
...@@ -804,7 +805,7 @@ location @cache { ...@@ -804,7 +805,7 @@ location @cache {
} }
error_page 405 = @drupal; error_page 405 = @drupal;
add_header Expires "Tue, 24 Jan 1984 08:00:00 GMT"; 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"; add_header X-Header "Boost Citrus 1.9";
charset utf-8; charset utf-8;
try_files /cache/normal/$host${uri}_$args.html @drupal; try_files /cache/normal/$host${uri}_$args.html @drupal;
...@@ -852,6 +853,7 @@ location = /index.php { ...@@ -852,6 +853,7 @@ location = /index.php {
add_header X-GeoIP-Country-Name "$geoip_country_name"; add_header X-GeoIP-Country-Name "$geoip_country_name";
add_header X-This-Proto "$http_x_forwarded_proto"; add_header X-This-Proto "$http_x_forwarded_proto";
add_header X-Server-Name "$server_name"; 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; tcp_nopush off;
keepalive_requests 0; keepalive_requests 0;
try_files $uri =404; ### check for existence of php file first try_files $uri =404; ### check for existence of php file first
......
...@@ -729,7 +729,7 @@ location ~* \.xml$ { ...@@ -729,7 +729,7 @@ location ~* \.xml$ {
error_page 405 = @drupal; error_page 405 = @drupal;
access_log off; access_log off;
add_header Expires "Tue, 24 Jan 1984 08:00:00 GMT"; 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"; add_header X-Header "Boost Citrus 2.4";
charset utf-8; charset utf-8;
types { } types { }
...@@ -804,6 +804,7 @@ location ~ ^/(?<esi>esi/.*)"$ { ...@@ -804,6 +804,7 @@ location ~ ^/(?<esi>esi/.*)"$ {
add_header X-GeoIP-Country-Name "$geoip_country_name"; add_header X-GeoIP-Country-Name "$geoip_country_name";
add_header X-This-Proto "$http_x_forwarded_proto"; add_header X-This-Proto "$http_x_forwarded_proto";
add_header X-Server-Name "$server_name"; 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. ### Set correct, local $uri.
### ###
...@@ -878,7 +879,7 @@ location @cache { ...@@ -878,7 +879,7 @@ location @cache {
} }
error_page 405 = @drupal; error_page 405 = @drupal;
add_header Expires "Tue, 24 Jan 1984 08:00:00 GMT"; 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"; add_header X-Header "Boost Citrus 1.9";
charset utf-8; charset utf-8;
try_files /cache/normal/$host${uri}_$args.html @drupal; try_files /cache/normal/$host${uri}_$args.html @drupal;
...@@ -926,6 +927,7 @@ location = /index.php { ...@@ -926,6 +927,7 @@ location = /index.php {
add_header X-GeoIP-Country-Name "$geoip_country_name"; add_header X-GeoIP-Country-Name "$geoip_country_name";
add_header X-This-Proto "$http_x_forwarded_proto"; add_header X-This-Proto "$http_x_forwarded_proto";
add_header X-Server-Name "$server_name"; 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; tcp_nopush off;
keepalive_requests 0; keepalive_requests 0;
try_files $uri =404; ### check for existence of php file first try_files $uri =404; ### check for existence of php file first
......
...@@ -716,7 +716,7 @@ location ~* \.xml$ { ...@@ -716,7 +716,7 @@ location ~* \.xml$ {
error_page 405 = @drupal; error_page 405 = @drupal;
access_log off; access_log off;
add_header Expires "Tue, 24 Jan 1984 08:00:00 GMT"; 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"; add_header X-Header "Boost Citrus 2.4";
charset utf-8; charset utf-8;
types { } types { }
...@@ -791,6 +791,7 @@ location ~ ^/(?<esi>esi/.*)"$ { ...@@ -791,6 +791,7 @@ location ~ ^/(?<esi>esi/.*)"$ {
add_header X-GeoIP-Country-Name "$geoip_country_name"; add_header X-GeoIP-Country-Name "$geoip_country_name";
add_header X-This-Proto "$http_x_forwarded_proto"; add_header X-This-Proto "$http_x_forwarded_proto";
add_header X-Server-Name "$server_name"; 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. ### Set correct, local $uri.
### ###
...@@ -865,7 +866,7 @@ location @cache { ...@@ -865,7 +866,7 @@ location @cache {
} }
error_page 405 = @drupal; error_page 405 = @drupal;
add_header Expires "Tue, 24 Jan 1984 08:00:00 GMT"; 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"; add_header X-Header "Boost Citrus 1.9";
charset utf-8; charset utf-8;
try_files /cache/normal/$host${uri}_$args.html @drupal; try_files /cache/normal/$host${uri}_$args.html @drupal;
...@@ -913,6 +914,7 @@ location = /index.php { ...@@ -913,6 +914,7 @@ location = /index.php {
add_header X-GeoIP-Country-Name "$geoip_country_name"; add_header X-GeoIP-Country-Name "$geoip_country_name";
add_header X-This-Proto "$http_x_forwarded_proto"; add_header X-This-Proto "$http_x_forwarded_proto";
add_header X-Server-Name "$server_name"; 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; tcp_nopush off;
keepalive_requests 0; keepalive_requests 0;
try_files $uri =404; ### check for existence of php file first try_files $uri =404; ### check for existence of php file first
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment