From 4257270e6149a45acd2b367153c571c235639cec Mon Sep 17 00:00:00 2001 From: Alan Greene Date: Mon, 16 Sep 2024 12:26:22 +0100 Subject: [PATCH] Add missing API root for external logs requests Somehow the external logs APIs in the client never used the API root when constructing the URL. This means that if the Dashboard is deployed at a non-root path, the requests never made it to the logs proxy. Update the external logs URL util to include the API root in the same manner as we already do for all other APIs. --- src/api/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/index.js b/src/api/index.js index d4d19d163..8e2d6e3be 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -153,7 +153,7 @@ export function getExternalLogURL({ if (queryString) { queryString = `?${queryString}`; } - return `${externalLogsURL}/${namespace}/${podName}/${container}${queryString}`; + return `${getAPIRoot({ isDashboardAPI: true })}${externalLogsURL}/${namespace}/${podName}/${container}${queryString}`; } export function getPodLogURL({ container, name, namespace, follow }) {