changed to use serverBaseUrl instead (#32412)
fixes: #32205 Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
This commit is contained in:
parent
ccb166d0e9
commit
760b1d2a4c
1 changed files with 8 additions and 6 deletions
|
@ -6,8 +6,10 @@ import {
|
||||||
import {
|
import {
|
||||||
FormErrorText,
|
FormErrorText,
|
||||||
HelpItem,
|
HelpItem,
|
||||||
|
KeycloakSpinner,
|
||||||
SelectControl,
|
SelectControl,
|
||||||
TextControl,
|
TextControl,
|
||||||
|
useEnvironment,
|
||||||
useFetch,
|
useFetch,
|
||||||
} from "@keycloak/keycloak-ui-shared";
|
} from "@keycloak/keycloak-ui-shared";
|
||||||
import {
|
import {
|
||||||
|
@ -26,16 +28,14 @@ import { FormattedLink } from "../components/external-link/FormattedLink";
|
||||||
import { FixedButtonsGroup } from "../components/form/FixedButtonGroup";
|
import { FixedButtonsGroup } from "../components/form/FixedButtonGroup";
|
||||||
import { FormAccess } from "../components/form/FormAccess";
|
import { FormAccess } from "../components/form/FormAccess";
|
||||||
import { KeyValueInput } from "../components/key-value-form/KeyValueInput";
|
import { KeyValueInput } from "../components/key-value-form/KeyValueInput";
|
||||||
import { KeycloakSpinner } from "@keycloak/keycloak-ui-shared";
|
|
||||||
import { useRealm } from "../context/realm-context/RealmContext";
|
import { useRealm } from "../context/realm-context/RealmContext";
|
||||||
import {
|
import {
|
||||||
addTrailingSlash,
|
addTrailingSlash,
|
||||||
convertAttributeNameToForm,
|
convertAttributeNameToForm,
|
||||||
convertToFormValues,
|
convertToFormValues,
|
||||||
} from "../util";
|
} from "../util";
|
||||||
import { UIRealmRepresentation } from "./RealmSettingsTabs";
|
|
||||||
|
|
||||||
import useIsFeatureEnabled, { Feature } from "../utils/useIsFeatureEnabled";
|
import useIsFeatureEnabled, { Feature } from "../utils/useIsFeatureEnabled";
|
||||||
|
import { UIRealmRepresentation } from "./RealmSettingsTabs";
|
||||||
|
|
||||||
type RealmSettingsGeneralTabProps = {
|
type RealmSettingsGeneralTabProps = {
|
||||||
realm: UIRealmRepresentation;
|
realm: UIRealmRepresentation;
|
||||||
|
@ -95,7 +95,9 @@ function RealmSettingsGeneralTabForm({
|
||||||
save,
|
save,
|
||||||
userProfileConfig,
|
userProfileConfig,
|
||||||
}: RealmSettingsGeneralTabFormProps) {
|
}: RealmSettingsGeneralTabFormProps) {
|
||||||
const { adminClient } = useAdminClient();
|
const {
|
||||||
|
environment: { serverBaseUrl },
|
||||||
|
} = useEnvironment();
|
||||||
|
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const { realm: realmName } = useRealm();
|
const { realm: realmName } = useRealm();
|
||||||
|
@ -250,7 +252,7 @@ function RealmSettingsGeneralTabForm({
|
||||||
<StackItem>
|
<StackItem>
|
||||||
<FormattedLink
|
<FormattedLink
|
||||||
href={`${addTrailingSlash(
|
href={`${addTrailingSlash(
|
||||||
adminClient.baseUrl,
|
serverBaseUrl,
|
||||||
)}realms/${realmName}/.well-known/openid-configuration`}
|
)}realms/${realmName}/.well-known/openid-configuration`}
|
||||||
title={t("openIDEndpointConfiguration")}
|
title={t("openIDEndpointConfiguration")}
|
||||||
/>
|
/>
|
||||||
|
@ -258,7 +260,7 @@ function RealmSettingsGeneralTabForm({
|
||||||
<StackItem>
|
<StackItem>
|
||||||
<FormattedLink
|
<FormattedLink
|
||||||
href={`${addTrailingSlash(
|
href={`${addTrailingSlash(
|
||||||
adminClient.baseUrl,
|
serverBaseUrl,
|
||||||
)}realms/${realmName}/protocol/saml/descriptor`}
|
)}realms/${realmName}/protocol/saml/descriptor`}
|
||||||
title={t("samlIdentityProviderMetadata")}
|
title={t("samlIdentityProviderMetadata")}
|
||||||
/>
|
/>
|
||||||
|
|
Loading…
Reference in a new issue