mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2026-04-26 00:12:51 +01:00
Fix Juno and Phoenix validations
This commit is contained in:
@@ -485,7 +485,7 @@ export class JunoClient {
|
||||
// public for tests
|
||||
public static getJunoEndpoint(): string {
|
||||
const junoEndpoint = userContext.features.junoEndpoint ?? configContext.JUNO_ENDPOINT;
|
||||
if (validateEndpoint(junoEndpoint, configContext.allowedJunoOrigins)) {
|
||||
if (!validateEndpoint(junoEndpoint, configContext.allowedJunoOrigins)) {
|
||||
const error = `${junoEndpoint} not allowed as juno endpoint`;
|
||||
console.error(error);
|
||||
throw new Error(error);
|
||||
|
||||
@@ -155,7 +155,7 @@ export class PhoenixClient {
|
||||
public static getPhoenixEndpoint(): string {
|
||||
const phoenixEndpoint =
|
||||
userContext.features.phoenixEndpoint ?? userContext.features.junoEndpoint ?? configContext.JUNO_ENDPOINT;
|
||||
if (validateEndpoint(phoenixEndpoint, configContext.allowedJunoOrigins)) {
|
||||
if (!validateEndpoint(phoenixEndpoint, configContext.allowedJunoOrigins)) {
|
||||
const error = `${phoenixEndpoint} not allowed as juno endpoint`;
|
||||
console.error(error);
|
||||
throw new Error(error);
|
||||
|
||||
Reference in New Issue
Block a user