Secure your Solr instance by placing the application on a different file server and behind a firewall.
With every programming language, there's a list of best practices; do's and don'ts. JavaScript is no exception.
A conference call in real life.