chore: establish local platform baseline
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
declare global {
|
||||
interface Window {
|
||||
__VOICE_PLATFORM_CONFIG__?: {
|
||||
oidcAuthority?: string;
|
||||
oidcClientId?: string;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
function configuredValue(value: string | undefined, fallback: string): string {
|
||||
const normalized = value?.trim();
|
||||
return normalized ? normalized : fallback;
|
||||
}
|
||||
|
||||
export const runtimeConfig = Object.freeze({
|
||||
oidcAuthority: configuredValue(window.__VOICE_PLATFORM_CONFIG__?.oidcAuthority, "http://localhost:58180/realms/voice-local").replace(/\/+$/, ""),
|
||||
oidcClientId: configuredValue(window.__VOICE_PLATFORM_CONFIG__?.oidcClientId, "voice-platform-web")
|
||||
});
|
||||
|
||||
export {};
|
||||
Reference in New Issue
Block a user