Skip to content

Commit 6657555

Browse files
committed
purge: Prevent caching of purge response
Especially since our stricter CDN ignores query parameters, and thus makes it impossible to purge two different URLs since the second hit will serve the response to the previous purge request. Ref https://github.com/jquery/infrastructure/issues/474.
1 parent baff0b3 commit 6657555

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

purge.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ function jq_request_post_json( $url, array $headers, array $postData ) {
7777
}
7878

7979
header( 'Content-Type: text/plain' );
80+
header( 'Cache-Control: private, no-cache, must-revalidate' );
8081
header( 'X-Content-Type-Options: nosniff' );
8182
echo "Attempting to purge:\n{$file}\n\n";
8283

0 commit comments

Comments
 (0)