mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-02-26 22:17:30 +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",
|
"--inspect-brk",
|
||||||
"${workspaceRoot}/node_modules/jest/bin/jest.js",
|
"${workspaceRoot}/node_modules/jest/bin/jest.js",
|
||||||
"--runInBand",
|
"--runInBand",
|
||||||
"--coverage", "false"
|
"--coverage",
|
||||||
|
"false"
|
||||||
],
|
],
|
||||||
"console": "integratedTerminal",
|
"console": "integratedTerminal",
|
||||||
"internalConsoleOptions": "neverOpen",
|
"internalConsoleOptions": "neverOpen",
|
||||||
@ -26,7 +27,8 @@
|
|||||||
"--inspect-brk",
|
"--inspect-brk",
|
||||||
"${workspaceRoot}/node_modules/jest/bin/jest.js",
|
"${workspaceRoot}/node_modules/jest/bin/jest.js",
|
||||||
"${fileBasenameNoExtension}",
|
"${fileBasenameNoExtension}",
|
||||||
"--coverage", "false",
|
"--coverage",
|
||||||
|
"false",
|
||||||
// "--watch",
|
// "--watch",
|
||||||
// // --no-cache only used to make --watch work. Otherwise jest ignores the breakpoints.
|
// // --no-cache only used to make --watch work. Otherwise jest ignores the breakpoints.
|
||||||
// // https://github.com/facebook/jest/issues/6683
|
// // https://github.com/facebook/jest/issues/6683
|
||||||
|
@ -485,7 +485,7 @@ export class JunoClient {
|
|||||||
// public for tests
|
// public for tests
|
||||||
public static getJunoEndpoint(): string {
|
public static getJunoEndpoint(): string {
|
||||||
const junoEndpoint = userContext.features.junoEndpoint ?? configContext.JUNO_ENDPOINT;
|
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`;
|
const error = `${junoEndpoint} not allowed as juno endpoint`;
|
||||||
console.error(error);
|
console.error(error);
|
||||||
throw new Error(error);
|
throw new Error(error);
|
||||||
|
@ -155,7 +155,7 @@ export class PhoenixClient {
|
|||||||
public static getPhoenixEndpoint(): string {
|
public static getPhoenixEndpoint(): string {
|
||||||
const phoenixEndpoint =
|
const phoenixEndpoint =
|
||||||
userContext.features.phoenixEndpoint ?? userContext.features.junoEndpoint ?? configContext.JUNO_ENDPOINT;
|
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`;
|
const error = `${phoenixEndpoint} not allowed as juno endpoint`;
|
||||||
console.error(error);
|
console.error(error);
|
||||||
throw new Error(error);
|
throw new Error(error);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user