function hook_esi_block_cache_headers_alter in ESI: Edge Side Includes 7.3
Alter the headers used when delivering the ESI block.
Parameters
array $headers: Each header is an array where the first value is the header name, and the second value is the header's value.
object $block: Pass along information about the current block so it can be referenced.
1 invocation of hook_esi_block_cache_headers_alter()
- esi_block_set_http_headers in modules/
esi_block/ esi_block.esi.inc - Set HTTP headers to control caching of ESI fragments.
File
- modules/
esi_block/ esi_block.api.inc, line 39 - API documentation for hooks defined by ESI Block.
Code
function hook_esi_block_cache_headers_alter(&$headers, $block) {
// Add a header to show where the ESI is generated.
$headers[] = array(
'X-BLOCK',
'TRUE',
);
}