Skip to content

Commit

Permalink
fix: purge mobile cache
Browse files Browse the repository at this point in the history
  • Loading branch information
daflyinbed committed May 4, 2024
1 parent 5de9f19 commit 5e1d247
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions includes/deferred/CdnCacheUpdate.php
Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,19 @@ private static function naivePurge( array $urls ) {
'User-Agent' => 'MediaWiki/' . MW_VERSION . ' ' . __CLASS__
]
];
$mobileReq = [
'method' => 'PURGE',
'url' => $url,
'headers' => [
'Host' => "m." . $urlHost,
'Connection' => 'Keep-Alive',
'Proxy-Connection' => 'Keep-Alive',
'User-Agent' => 'MediaWiki/' . MW_VERSION . ' ' . __CLASS__
]
];
foreach ( $cdnServers as $server ) {
$reqs[] = ( $baseReq + [ 'proxy' => $server ] );
$reqs[] = ( $mobileReq );
}
}

Expand Down

0 comments on commit 5e1d247

Please sign in to comment.