Encode realm name in URL when fetching from ui-ext
(#28703)
Closes #28702 Signed-off-by: jchong <jhchong92@gmail.com>
This commit is contained in:
parent
4672366eb9
commit
dbd016d4ec
1 changed files with 6 additions and 2 deletions
|
@ -11,8 +11,12 @@ export async function fetchAdminUI<T>(
|
|||
const baseUrl = adminClient.baseUrl;
|
||||
|
||||
const response = await fetchWithError(
|
||||
joinPath(baseUrl, "admin/realms", adminClient.realmName, endpoint) +
|
||||
(query ? "?" + new URLSearchParams(query) : ""),
|
||||
joinPath(
|
||||
baseUrl,
|
||||
"admin/realms",
|
||||
encodeURIComponent(adminClient.realmName),
|
||||
endpoint,
|
||||
) + (query ? "?" + new URLSearchParams(query) : ""),
|
||||
{
|
||||
method: "GET",
|
||||
headers: getAuthorizationHeaders(accessToken),
|
||||
|
|
Loading…
Reference in a new issue