We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 430f427 commit 676ca27Copy full SHA for 676ca27
src/server.ts
@@ -239,6 +239,13 @@ export class Server {
239
// Validate API client credentials
240
if (this.userConfig.apiClientId && this.userConfig.apiClientSecret) {
241
try {
242
+ if (!this.userConfig.apiBaseUrl.startsWith("https://")) {
243
+ const message =
244
+ "Failed to validate MongoDB Atlas the credentials from the config: API URL must be HTTPS";
245
+ console.error(message);
246
+ throw new Error(message);
247
+ }
248
+
249
await this.session.apiClient.validateAccessToken();
250
} catch (error) {
251
if (this.userConfig.connectionString === undefined) {
0 commit comments