different appreach without replace
Signed-off-by: Lucas De Souza <lucas.desouza@aa.com>
This commit is contained in:
@@ -202,7 +202,12 @@ export class KubernetesClientBasedFetcher implements KubernetesFetcher {
|
||||
),
|
||||
);
|
||||
}
|
||||
url.pathname = (url.pathname + resourcePath).replace('//', '/');
|
||||
|
||||
if (url.pathname === '/') {
|
||||
url.pathname = resourcePath;
|
||||
} else {
|
||||
url.pathname += resourcePath;
|
||||
}
|
||||
|
||||
if (labelSelector) {
|
||||
url.search = `labelSelector=${labelSelector}`;
|
||||
|
||||
Reference in New Issue
Block a user