Skip to content

Commit

Permalink
Added startsWith() check
Browse files Browse the repository at this point in the history
  • Loading branch information
rennokki committed Aug 3, 2021
1 parent 1d78d9b commit df18f5a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/KubernetesCluster.php
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,9 @@ protected function makeWsRequest(string $path, Closure $callback = null, array $
];

foreach ($replaces as $search => $replace) {
$url = Str::replaceFirst($search, $replace, $url);
if (Str::startsWith($url, $search)) {
$url = Str::replaceFirst($search, $replace, $url);
}
}

[$loop, $ws] = $this->getWsClient($url);
Expand Down

0 comments on commit df18f5a

Please sign in to comment.