incubator-pagespeed-ngx icon indicating copy to clipboard operation
incubator-pagespeed-ngx copied to clipboard

Disable pagespeed optimization for specific user agent

Open AlexeyKosov opened this issue 7 years ago • 1 comments
trafficstars

Is it possible to disable some or all optimizations for a certain user agent (crawler)? When it crawls the site, CPU usage for the nginx process is getting too high primarily because of the pagespeed module.

AlexeyKosov avatar Nov 01 '18 09:11 AlexeyKosov

Hi @AlexeyKosov Have you tried the DisableBackgroundFetchesForBots filter? Or you can use some like if ($http_user_agent ~* "^xxx$") { pagespeed unpluged; }

Lofesa avatar Nov 05 '18 10:11 Lofesa