Skip to content

Commit

Permalink
Fix preloading mobile cache version when a Mandatory cookie is set (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
engahmeds3ed authored Jul 12, 2023
1 parent 4c697c3 commit 6f7824a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion inc/Engine/Preload/Controller/PreloadUrl.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ protected function get_mobile_user_agent_prefix() {
return $prefix;
}

return $new_prefix;
return 'WP Rocket/Preload ' . $new_prefix;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
'filter' => 'new_prefix',

],
'expected' => 'new_prefix'
'expected' => 'WP Rocket/Preload new_prefix'
]
];
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
'config_mobile' => [
'blocking' => false,
'timeout' => 0.01,
'user-agent' => 'Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1'
'user-agent' => 'WP Rocket/Preload Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1'
],
'mobile_cache' => true,
'user_agent' => 'Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1',
'user_agent' => 'WP Rocket/Preload Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1',
'process_generate' => [
'is_wp_error' => true,
'response' => 'content'
Expand Down Expand Up @@ -48,10 +48,10 @@
'config_mobile' => [
'blocking' => false,
'timeout' => 0.01,
'user-agent' => 'Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1'
'user-agent' => 'WP Rocket/Preload Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1'
],
'mobile_cache' => true,
'user_agent' => 'Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1',
'user_agent' => 'WP Rocket/Preload Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1',
'process_generate' => [
'is_wp_error' => true,
'response' => 'content'
Expand Down

0 comments on commit 6f7824a

Please sign in to comment.