After exposing the Solr endpoint with a reverse proxy, it's important to note that it also exposes the Solr admin panel to the end-user.
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.