mirror of
https://github.com/strapi/strapi.git
synced 2025-12-27 07:03:38 +00:00
Use the MongoDB setting useUnifiedTopology when testing connection (#9561)
Signed-off-by: Derrick Mehaffy <derrickmehaffy@gmail.com>
This commit is contained in:
parent
65bc2d04d3
commit
154e59c9c7
@ -23,6 +23,7 @@ module.exports = async ({ connection }) => {
|
||||
connectOptions.ssl = ssl ? true : false;
|
||||
connectOptions.useNewUrlParser = true;
|
||||
connectOptions.dbName = connection.settings.database;
|
||||
connectOptions.useUnifiedTopology = true;
|
||||
|
||||
return Mongoose.connect(
|
||||
`mongodb${srv ? '+srv' : ''}://${connection.settings.host}${
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user