Skip to content

purge: Fix CDN purge script (enable purgeAllDynamic option) #48

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 20, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions purge.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

// The StrikeTracker Purge API is protocol-sensitive.
// HTTP and HTTPS need to be purged separately, or
// we can use a protocol-relative file url, which HW
// we can use a protocol-relative file url, which Highwinds
// supports as short-cut for purging both.
$file = "//{$hwConfig->file_hostname}/" . ltrim( $_SERVER[ 'REQUEST_URI' ], '/' );

Expand Down Expand Up @@ -73,10 +73,10 @@ function jq_request_post_json( $url, array $headers, array $postData ) {
"Authorization: Bearer {$hwConfig->api_token}",
"Content-Type: application/json",
),
// post body (JSON)
// post body (will be encoded as JSON)
array(
'list' => array(
array( 'url' => $file ),
array( 'url' => $file, 'purgeAllDynamic' => true ),
),
)
);
Expand Down