Merged in feature/from-pantheon (pull request #16)

code from pantheon

* code from pantheon
This commit is contained in:
Tony Volpe
2024-01-10 17:03:02 +00:00
parent 054b4fffc9
commit 4eb982d7a8
16492 changed files with 3475854 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
<?php
/*
* Exclude Campaign cron from cache
*/
$regex_path_patterns = array(
'#^/iper_cron/?#',
);
foreach ($regex_path_patterns as $regex_path_pattern) {
if (preg_match($regex_path_pattern, $_SERVER['REQUEST_URI'])) {
add_action( 'send_headers', 'add_header_nocache', 15 );
break;
}
}
function add_header_nocache() {
header( 'Cache-Control: no-cache, must-revalidate, max-age=0' );
}