fix idp on started
This commit is contained in:
@@ -9,8 +9,8 @@ function resolveBrowserApiBaseUrl(): string {
|
||||
|
||||
try {
|
||||
const configured = new URL(configuredApiUrl);
|
||||
if (configured.origin !== window.location.origin) {
|
||||
return `${window.location.origin}${API_ORIGIN_PROXY_PREFIX}`;
|
||||
if (configured.hostname !== window.location.hostname) {
|
||||
return API_ORIGIN_PROXY_PREFIX;
|
||||
}
|
||||
} catch {
|
||||
// keep configured URL
|
||||
@@ -24,9 +24,15 @@ function resolveBrowserWsBaseUrl(): string {
|
||||
return configuredWsUrl;
|
||||
}
|
||||
|
||||
const apiBase = resolveBrowserApiBaseUrl();
|
||||
if (apiBase === API_ORIGIN_PROXY_PREFIX) {
|
||||
const scheme = window.location.protocol === 'https:' ? 'wss:' : 'ws:';
|
||||
return `${scheme}//${window.location.host}${API_ORIGIN_PROXY_PREFIX}/ws`;
|
||||
}
|
||||
|
||||
try {
|
||||
const configured = new URL(configuredWsUrl);
|
||||
if (configured.origin !== window.location.origin) {
|
||||
if (configured.hostname !== window.location.hostname) {
|
||||
const scheme = window.location.protocol === 'https:' ? 'wss:' : 'ws:';
|
||||
return `${scheme}//${window.location.host}${API_ORIGIN_PROXY_PREFIX}/ws`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user