Files
medusa-store/www/apps/docs/content/deployments
Sujal Gurung bd60efbe65 docs: set rejectUnauthorized based on condition (#5907)
The general guide for hosting the server tells users to set `ssl.rejectUnauthorized` to false for production environments. However, the provided code snippet doesn't check the environment while setting the value. Directly pasting it into `medusa-config.js` will cause database connection attempts made from a development environment to be rejected and you can't even login to the admin account.

The change only sets the ssl property to false if the environment is a non-development one.  ~I got this code suggestion from the Kapa bot on discord so not sure if this is the best way to do this.~ This code is taken from the [configuration docs](https://docs.medusajs.com/development/backend/configurations#database_extra) themselves.

Co-authored-by: Shahed Nasser <27354907+shahednasser@users.noreply.github.com>
2023-12-18 12:27:10 +00:00
..