Hello Peter,
The format of the cache-control
header can be filtered with a function. What you want can be done with the following:
function addh_custom_cache_control_format ( $default ) {
// default format is: public, max-age=%s
// One %s placeholder must exist. It is replaced by the number of seconds.
// The following will return: public, max-age=%s, no-transform
return $default . ', no-transform';
}
add_filter( 'addh_cache_control_header_format', 'addh_custom_cache_control_format', 10, 1 );
Hope this helps
George
Also, you can use the addh_headers
filter hook to have access to all the generated headers or add custom headers. For example:
function addh_custom_headers ( $headers ) {
$headers[] = 'X-Custom-Header: 1234';
return $headers;
}
add_filter( 'addh_headers', 'addh_custom_headers', 10, 1 );
Thread Starter
Peter
(@tothpa)
Hi George!
It works fine!
Thank you so much!!!
Bests Peter