Can Meteor connect to MongoDB via SSL?

Can Meteor connect to MongoDB via SSL? If so, what should MONGO_URL be set so that the connection is encrypted?

+5
source share
2 answers

It looks like you just need to include ssl=true in the MONGO_URL connection MONGO_URL , for example.

MONGO_URL=mongodb://user: password@ip :port/mydb?ssl=true

Cm:

Update:

Since writing this answer, I really tried and could not use the ssl=true parameter in the MONGO_URL connection MONGO_URL .

This prompted me to study the Mongo.setConnectionOptions method and publish this simple package that allows you to switch to more advanced connection options .

0
source

Yes! In fact, on free Meteor hosting, all Mongo connection URLs are SSL connection URLs. It works fine because for low-level operations with MongoDB, Meteor uses the same node-Mongodb-native npm module that supports SSL.

0
source

Source: https://habr.com/ru/post/1205326/


All Articles