mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-02-26 14:07:46 +00:00
Fix Juno and Phoenix validations
This commit is contained in:
parent
1b1371381e
commit
899d7459c1
6
.vscode/launch.json
vendored
6
.vscode/launch.json
vendored
@ -12,7 +12,8 @@
|
||||
"--inspect-brk",
|
||||
"${workspaceRoot}/node_modules/jest/bin/jest.js",
|
||||
"--runInBand",
|
||||
"--coverage", "false"
|
||||
"--coverage",
|
||||
"false"
|
||||
],
|
||||
"console": "integratedTerminal",
|
||||
"internalConsoleOptions": "neverOpen",
|
||||
@ -26,7 +27,8 @@
|
||||
"--inspect-brk",
|
||||
"${workspaceRoot}/node_modules/jest/bin/jest.js",
|
||||
"${fileBasenameNoExtension}",
|
||||
"--coverage", "false",
|
||||
"--coverage",
|
||||
"false",
|
||||
// "--watch",
|
||||
// // --no-cache only used to make --watch work. Otherwise jest ignores the breakpoints.
|
||||
// // https://github.com/facebook/jest/issues/6683
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user