Skip to content

Commit

Permalink
Fix base URL
Browse files Browse the repository at this point in the history
  • Loading branch information
bencroker committed Sep 24, 2024
1 parent afc8dfa commit e1e2c56
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/F5Purger.php
Original file line number Diff line number Diff line change
Expand Up @@ -225,15 +225,14 @@ private function getLongestCommonPrefix($str1, $str2): string
private function sendRequest(string $pattern): bool
{
$client = Craft::createGuzzleClient([
'base_uri' => $this->baseUrl,
'headers' => [
'Content-Type' => 'application/json',
'Authorization' => 'APIToken ' . $this->apiToken,
'Authorization' => 'APIToken ' . App::parseEnv($this->apiToken),
],
'timeout' => self::API_REQUEST_TIMEOUT,
]);

$baseUrl = rtrim('/', $this->baseUrl) . '/';
$baseUrl = rtrim(App::parseEnv($this->baseUrl), '/') . '/';
$url = $baseUrl . 'api/cdn/namespaces/' . App::parseEnv($this->namespace) . '/cdn_loadbalancer/' . App::parseEnv($this->name) . '/cache-purge';

$options = [
Expand Down

0 comments on commit e1e2c56

Please sign in to comment.