summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwebchick2012-12-26 19:10:22 (GMT)
committerwebchick2012-12-26 19:10:22 (GMT)
commitefde866599082840ff0017d82d553db0c919c258 (patch)
treefc55e5fdf0be8e79b70eae3fe71d68eb8ff9a680
parente200408fa3a50b7cfc9281fc4ec49d2fa6807499 (diff)
Issue #1831076 by ACF, Albert Volkman: Convert omit_vary_cookie() to cmi.
-rw-r--r--core/includes/bootstrap.inc2
-rw-r--r--core/modules/system/config/system.performance.yml1
-rw-r--r--core/modules/system/system.install1
-rw-r--r--sites/default/default.settings.php2
4 files changed, 4 insertions, 2 deletions
diff --git a/core/includes/bootstrap.inc b/core/includes/bootstrap.inc
index b3f431f..74130ab 100644
--- a/core/includes/bootstrap.inc
+++ b/core/includes/bootstrap.inc
@@ -1391,7 +1391,7 @@ function drupal_serve_page_from_cache(stdClass $cache) {
// response to reply to a subsequent request for a given URL without
// revalidation. If a Vary header has been set in hook_boot(), it is assumed
// that the module knows how to cache the page.
- if (!isset($hook_boot_headers['vary']) && !variable_get('omit_vary_cookie')) {
+ if (!isset($hook_boot_headers['vary']) && !config('system.performance')->get('cache.page.omit_vary_cookie')) {
header('Vary: Cookie');
}
diff --git a/core/modules/system/config/system.performance.yml b/core/modules/system/config/system.performance.yml
index d508591..61adb18 100644
--- a/core/modules/system/config/system.performance.yml
+++ b/core/modules/system/config/system.performance.yml
@@ -1,6 +1,7 @@
cache:
page:
enabled: '0'
+ omit_vary_cookie: ''
max_age: '0'
css:
preprocess: '0'
diff --git a/core/modules/system/system.install b/core/modules/system/system.install
index bd76724..f4e3cad 100644
--- a/core/modules/system/system.install
+++ b/core/modules/system/system.install
@@ -1872,6 +1872,7 @@ function system_update_8017() {
'page_compression' => 'response.gzip',
'preprocess_css' => 'css.preprocess',
'preprocess_js' => 'js.preprocess',
+ 'omit_vary_cookie' => 'omit_vary_cookie',
'stale_file_threshold' => 'stale_file_threshold',
));
}
diff --git a/sites/default/default.settings.php b/sites/default/default.settings.php
index 8d123d2..5022c24 100644
--- a/sites/default/default.settings.php
+++ b/sites/default/default.settings.php
@@ -444,7 +444,7 @@ ini_set('session.cookie_lifetime', 2000000);
* HTTP proxy, and bypass the reverse proxy if one is used) in order to avoid
* getting cached pages from the proxy.
*/
-# $conf['omit_vary_cookie'] = TRUE;
+# $conf['system.performance']['cache']['page']['omit_vary_cookie'] = TRUE;
/**
* CSS/JS aggregated file gzip compression: