Disable New Relic at AMP in wp-ffpc-acache.php
Prevent New Relic from inserting JS code into an Accelerated Mobile Pages (AMP). This is required to get valid AMP code. References: https://www.ampproject.org with https://wordpress.org/plugins/amp/ http://newrelic.com
This commit is contained in:
parent
d09fa5828b
commit
aad6ebbed1
1 changed files with 7 additions and 0 deletions
|
@ -41,6 +41,13 @@ if (!isset($wp_ffpc_config)) {
|
|||
/* request uri */
|
||||
$wp_ffpc_uri = $_SERVER['REQUEST_URI'];
|
||||
|
||||
/* disable New Relic at AMP */
|
||||
if (stripos($wp_ffpc_uri, '/amp/')) {
|
||||
if (extension_loaded('newrelic')) {
|
||||
newrelic_disable_autorum();
|
||||
}
|
||||
}
|
||||
|
||||
/* no cache for robots.txt */
|
||||
if ( stripos($wp_ffpc_uri, 'robots.txt') ) {
|
||||
__wp_ffpc_debug__ ( 'Skippings robots.txt hit');
|
||||
|
|
Loading…
Reference in a new issue