I am working on a Java web application that interacts with a MongoDB Atlas database for CRUD operations. My goal is to disable server-side JavaScript for my Atlas instance directly from the Java web application itself.
After researching, I came across this article and this documentation, both suggesting that modifying the mongod.conf
file or using the command line argument --noscripting
when starting the mongod
process can achieve this. However, I prefer to implement this functionality within my Java web application upon startup.
Is there a mechanism provided by the MongoDB Java driver to accomplish this?
Are there any other methods to achieve the same outcome?
Note: I do not intend to execute the mongod
command from within my web application.