legacy mongo shell debug

This commit is contained in:
Asier Isayas 2025-05-28 12:24:26 -04:00
parent 34edd96c76
commit f304600eca
5 changed files with 6 additions and 3 deletions

View File

@ -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,
});
}

View File

@ -128,7 +128,7 @@ export default class MongoShellTabComponent extends Component<
apiEndpoint: apiEndpoint,
},
},
window.origin,
"https://localhost:443",
);
}

View File

@ -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}`;
}

View File

@ -5,6 +5,7 @@ export function validateEndpoint(
endpointToValidate: string | undefined,
allowedEndpoints: ReadonlyArray<string>,
): boolean {
return true;
try {
return validateEndpointInternal(
endpointToValidate,

View File

@ -5,6 +5,7 @@ export function isInvalidParentFrameOrigin(event: MessageEvent): boolean {
}
function isValidOrigin(allowedOrigins: ReadonlyArray<string>, event: MessageEvent): boolean {
return true;
const eventOrigin = (event && event.origin) || "";
const windowOrigin = (window && window.origin) || "";
if (eventOrigin === windowOrigin) {