diff --git a/src/ConfigContext.ts b/src/ConfigContext.ts index f09e5feb6..67f7afe6e 100644 --- a/src/ConfigContext.ts +++ b/src/ConfigContext.ts @@ -187,7 +187,8 @@ if (process.env.NODE_ENV === "development") { PROXY_PATH: "/proxy", EMULATOR_ENDPOINT: "https://localhost:8081", PORTAL_BACKEND_ENDPOINT: PortalBackendEndpoints.Mpac, - MONGO_PROXY_ENDPOINT: MongoProxyEndpoints.Mpac, + // MONGO_PROXY_ENDPOINT: "https://cosmos-db-portal-mongoproxy1-mpac-westus.azurewebsites.net", + MONGO_PROXY_ENDPOINT: "https://localhost:7238", CASSANDRA_PROXY_ENDPOINT: CassandraProxyEndpoints.Mpac, }); } diff --git a/src/Explorer/Tabs/MongoShellTab/MongoShellTabComponent.tsx b/src/Explorer/Tabs/MongoShellTab/MongoShellTabComponent.tsx index e0d9d6d29..37b807dc2 100644 --- a/src/Explorer/Tabs/MongoShellTab/MongoShellTabComponent.tsx +++ b/src/Explorer/Tabs/MongoShellTab/MongoShellTabComponent.tsx @@ -128,7 +128,7 @@ export default class MongoShellTabComponent extends Component< apiEndpoint: apiEndpoint, }, }, - window.origin, + "https://localhost:443", ); } diff --git a/src/Explorer/Tabs/MongoShellTab/getMongoShellUrl.ts b/src/Explorer/Tabs/MongoShellTab/getMongoShellUrl.ts index 36f47ce74..c35fbc250 100644 --- a/src/Explorer/Tabs/MongoShellTab/getMongoShellUrl.ts +++ b/src/Explorer/Tabs/MongoShellTab/getMongoShellUrl.ts @@ -7,5 +7,5 @@ export function getMongoShellUrl(): string { const mongoEndpoint = account?.properties?.mongoEndpoint || account?.properties?.documentEndpoint; const queryString = `resourceId=${resourceId}&accountName=${accountName}&mongoEndpoint=${mongoEndpoint}`; - return `/mongoshell/index.html?${queryString}`; + return `https://localhost:443/index.html?${queryString}`; } diff --git a/src/Utils/EndpointUtils.ts b/src/Utils/EndpointUtils.ts index 7e09c923d..441289351 100644 --- a/src/Utils/EndpointUtils.ts +++ b/src/Utils/EndpointUtils.ts @@ -5,6 +5,7 @@ export function validateEndpoint( endpointToValidate: string | undefined, allowedEndpoints: ReadonlyArray, ): boolean { + return true; try { return validateEndpointInternal( endpointToValidate, diff --git a/src/Utils/MessageValidation.ts b/src/Utils/MessageValidation.ts index 6490722ea..6b810c30e 100644 --- a/src/Utils/MessageValidation.ts +++ b/src/Utils/MessageValidation.ts @@ -5,6 +5,7 @@ export function isInvalidParentFrameOrigin(event: MessageEvent): boolean { } function isValidOrigin(allowedOrigins: ReadonlyArray, event: MessageEvent): boolean { + return true; const eventOrigin = (event && event.origin) || ""; const windowOrigin = (window && window.origin) || ""; if (eventOrigin === windowOrigin) {