Skip to content

Commit

Permalink
Merge pull request #1054 from johnoliver/remove-mongo-check
Browse files Browse the repository at this point in the history
Default DISABLE_MONGO_HOST_CHECK to false
  • Loading branch information
johnoliver authored Jun 12, 2024
2 parents 6650cdc + df27f60 commit 7aae752
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ open class MongoClient {
.applyConnectionString(ConnectionString(connectionString))
val sslEnabled = System.getenv("MONGODB_SSL")?.toBoolean()
if (sslEnabled == true) {
val checkMongoHostName = System.getenv("DISABLE_MONGO_HOST_CHECK")?.toBoolean() ?: true
val checkMongoHostName = System.getenv("DISABLE_MONGO_HOST_CHECK")?.toBoolean() ?: false

settingsBuilder = settingsBuilder.applyToSslSettings { it.enabled(true).invalidHostNameAllowed(checkMongoHostName) }
}
Expand Down

0 comments on commit 7aae752

Please sign in to comment.