Skip to content
Snippets Groups Projects
Commit a83f5251 authored by Dieter Holvoet's avatar Dieter Holvoet
Browse files

Issue #3195743 by dieterholvoet: Improve documentation on how to create a variation

parent 81c91c48
No related branches found
No related tags found
1 merge request!17Improve the description of the vary setting
Pipeline #357832 passed
......@@ -7,6 +7,7 @@
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Routing\RouteMatchInterface;
use Drupal\Core\Site\Settings;
/**
* Implements hook_help().
......@@ -225,9 +226,13 @@ function http_cache_control_form_system_performance_settings_alter(&$form, FormS
'#type' => 'textfield',
'#title' => t('Header variation'),
'#default_value' => $config->get('cache.http.vary'),
'#description' => t('Comma separated list of headers to vary cache globally.'),
'#description' => t('A comma-separated list of request header names that could have influenced the generation of this response.'),
];
if (!Settings::get('omit_vary_cookie')) {
$form['variation']['vary']['#description'] .= ' ' . t("The 'Cookie' header is automatically added.");
}
$form['#submit'][] = 'http_cache_control_form_system_performance_settings_submit';
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment