mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-21 09:51:11 +00:00
CP and MP API Overrides from Config.json (#1992)
* Force useMongoProxyEndpoint to always return true if valid endpoint provided. Enables new Mongo proxy in all environments. * Checking MP endpoint in config context. * Enabling cassandra proxy in all environments. Requires later cleanup. * Simplifying and removing endpoint validation since run when config context is generated. * Enabling one MP API at a time globally. * Revent to existing CP selection logic. * Creating list of globally enable CP apis. * Add list of mongo and cassandra APIs to config and only enable if environment outside existing list of environments. * Remove environment checks. If API globally enabled, return true. * Adding config initialization for mongo unit tests. * Default to empty enable list to minimize possible impact. Config.json overrides can be used for testing.
This commit is contained in:
@@ -67,6 +67,8 @@ export interface ConfigContext {
|
||||
hostedExplorerURL: string;
|
||||
armAPIVersion?: string;
|
||||
msalRedirectURI?: string;
|
||||
globallyEnabledCassandraAPIs?: string[];
|
||||
globallyEnabledMongoAPIs?: string[];
|
||||
}
|
||||
|
||||
// Default configuration
|
||||
@@ -114,6 +116,8 @@ let configContext: Readonly<ConfigContext> = {
|
||||
NEW_CASSANDRA_APIS: ["postQuery", "createOrDelete", "getKeys", "getSchema"],
|
||||
isTerminalEnabled: false,
|
||||
isPhoenixEnabled: false,
|
||||
globallyEnabledCassandraAPIs: [],
|
||||
globallyEnabledMongoAPIs: [],
|
||||
};
|
||||
|
||||
export function resetConfigContext(): void {
|
||||
|
||||
Reference in New Issue
Block a user