mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-20 01:11:25 +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:
@@ -757,6 +757,10 @@ export class CassandraAPIDataClient extends TableDataClient {
|
||||
CassandraProxyEndpoints.Mooncake,
|
||||
];
|
||||
|
||||
if (configContext.globallyEnabledCassandraAPIs.includes(api)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return (
|
||||
configContext.NEW_CASSANDRA_APIS?.includes(api) &&
|
||||
activeCassandraProxyEndpoints.includes(configContext.CASSANDRA_PROXY_ENDPOINT)
|
||||
|
||||
Reference in New Issue
Block a user