diff --git a/core/includes/bootstrap.inc b/core/includes/bootstrap.inc index b3f431f728f939941bb023212a0e601b85a7c6ba..74130abadb0225b4fa7f58ef59256b1366ee64ba 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 d508591d7e57530506780cd7128b43e7b0fe1d5a..61adb180d1481419ca3892fb53f77eeb304f67d2 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 bd76724615cf59e111a9ca8b1a7b377ddc82ade7..f4e3cadfe8fb4630dbdf951fe5d9b5bc2699c1ae 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 8d123d261fe2403e751d26306afa34794f07d5e2..5022c24f881330c27277c6b3a57a11e201e57d69 100644 --- a/sites/default/default.settings.php +++ b/sites/default/default.settings.php @@ -444,7 +444,7 @@ * 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: