mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-04-07 10:28:57 +01:00
Fix strict build
This commit is contained in:
parent
4b01648168
commit
e9b168be6d
@ -7,6 +7,10 @@ export function validateEndpoint(endpointToValidate: string | undefined, allowed
|
|||||||
}
|
}
|
||||||
|
|
||||||
function validateEndpointInternal(endpointToValidate: string | undefined, allowedEndpoints: string[]): boolean {
|
function validateEndpointInternal(endpointToValidate: string | undefined, allowedEndpoints: string[]): boolean {
|
||||||
|
if (endpointToValidate === undefined) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
const originToValidate: string = new URL(endpointToValidate).origin;
|
const originToValidate: string = new URL(endpointToValidate).origin;
|
||||||
const allowedOrigins: string[] = allowedEndpoints.map((allowedEndpoint) => new URL(allowedEndpoint).origin) || [];
|
const allowedOrigins: string[] = allowedEndpoints.map((allowedEndpoint) => new URL(allowedEndpoint).origin) || [];
|
||||||
const valid = allowedOrigins.indexOf(originToValidate) >= 0;
|
const valid = allowedOrigins.indexOf(originToValidate) >= 0;
|
||||||
@ -39,14 +43,14 @@ export const allowedMongoProxyEndpoints: ReadonlyArray<string> = [
|
|||||||
|
|
||||||
export const allowedEmulatorEndpoints: ReadonlyArray<string> = ["https://localhost:8081"];
|
export const allowedEmulatorEndpoints: ReadonlyArray<string> = ["https://localhost:8081"];
|
||||||
|
|
||||||
|
export const allowedMongoBackendEndpoints: ReadonlyArray<string> = ["https://localhost:1234"];
|
||||||
|
|
||||||
export const allowedGraphEndpoints: ReadonlyArray<string> = [];
|
export const allowedGraphEndpoints: ReadonlyArray<string> = [];
|
||||||
|
|
||||||
export const allowedArcadiaEndpoints: ReadonlyArray<string> = [];
|
export const allowedArcadiaEndpoints: ReadonlyArray<string> = [];
|
||||||
|
|
||||||
export const allowedArcadiaLivyDnsZones: ReadonlyArray<string> = [];
|
export const allowedArcadiaLivyDnsZones: ReadonlyArray<string> = [];
|
||||||
|
|
||||||
export const allowedMongoBackendEndpoints: ReadonlyArray<string> = ["https://localhost:1234"];
|
|
||||||
|
|
||||||
export const allowedHostedExplorerEndpoints: ReadonlyArray<string> = [];
|
export const allowedHostedExplorerEndpoints: ReadonlyArray<string> = [];
|
||||||
|
|
||||||
export const allowedMsalRedirectEndpoints: ReadonlyArray<string> = [];
|
export const allowedMsalRedirectEndpoints: ReadonlyArray<string> = [];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user