Skip to content

Commit

Permalink
Boost: Create hash from URL without trailing slash (#40303)
Browse files Browse the repository at this point in the history
* Create hash from URL without trailing slash

* changelog

* Remove leading slash from URL hash
  • Loading branch information
haqadn authored Nov 22, 2024
1 parent d7afe1a commit 18cc457
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ public static function get_hash_for_url( $url ) {
$url = substr( $url, strlen( $home_url ) );
}

$url = ltrim( $url, '/' );
$url = untrailingslashit( $url );

$hash = hash( 'md5', $url );

return substr( $hash, 0, 8 );
Expand Down
5 changes: 5 additions & 0 deletions projects/plugins/boost/changelog/fix-cornerstone-ccss-serving
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: fixed
Comment: Fixed cornerstone specific critical CSS not serving in some cases


0 comments on commit 18cc457

Please sign in to comment.