diff --git a/CHANGELOG.md b/CHANGELOG.md index 3b81b88..429f6fa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## Unreleased +### Changed +- reduced maximum Server Timing headers size to 2K (half of possible nginx defaults) + ## 3.3.4 - 2020-11-16 ### Fixed diff --git a/src/Manager/Server_Timing_Manager.php b/src/Manager/Server_Timing_Manager.php index e21eacf..a7fca8b 100644 --- a/src/Manager/Server_Timing_Manager.php +++ b/src/Manager/Server_Timing_Manager.php @@ -63,7 +63,7 @@ class Server_Timing_Manager { $header .= sprintf( '%s;dur=%.2f;desc="%s", ', $record->get_category(), $duration, $record->get_name() ); - if ( strlen( $header ) > 4000 ) { // 8+KB headers break proxies, so we cut off at 1/2 that limit. + if ( strlen( $header ) > 2000 ) { // 8+KB headers break proxies, 4+KB nginx, so we cut off at 1/2 that limit. break; } }