How to Solve Internal Server Error (500) While Posting To MongoDB




This error is usually sourced by MongoDB's whitelist protection. When your IP address changes, MongoDB bans your IP address since it is not whitelisted. As a result, the easy solution is to whitelist your IP on your MongoDB dashboard.

  1. Go to your dashboard
  2. Select Network Access in the left menu
  3. Select ADD IP ADRESS
  4. Put in the Address List Entry this 0.0.0.0 (that means anybody can access your database);
    or type in your current IP address
  5. Save and try
This should solve the problem.

Comments