/** * Insert *before* requiring wp-settings.php */ if (strpos(strtolower($_SERVER['HTTP_X_FORWARDED_PROTO']), 'https') !== false) { $_SERVER['HTTPS'] = 'on'; } define('FORCE_SSL_ADMIN', true); /** Sets up WordPress vars and included files. */ require_once(ABSPATH . 'wp-settings.php'); /** * Insert *after* requiring wp-settings.php * * Alternatively, you can add this to your child theme's functions.php, or into its own (mu) plugin. */ if (function_exists('add_filter')) { add_filter('addh_options', function($options) { // Another plugin handles the Expires and Cache-Control headers, so disable them in the Add Headers plugin. $options['add_expires_header'] = false; $options['add_cache_control_header'] = false; return $options; }); }