Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
if ( !defined( 'ABSPATH' ) ) exit;
function wp_keep_alive($headers, $wp) {
foreach ($headers as $key => $value) {
if ('connection' === strtolower($key)) {
$headers['Connection'] = 'Keep-Alive';
return $headers;
add_filter('wp_headers', 'wp_keep_alive', 10, 2);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.