Shafiq Shafiq - 6 months ago 48
Javascript Question

Node.js solrProxy access denied

I have to use proxy (node.js) to secure solr. I have followed this guide and perform following steps.

npm install solr-security-proxy


and then run it

`npm bin`/solr-security-proxy --port 9090 --backendHost 127.0.0.1 --backendPort 8983


and started solr like

java -jar start.jar


When I try to query solr via proxy like

http://localhost:9090/solr/collection1/select?q=online&wt=json&indent=true


It gives follwoing error

solrProxy: access denied


Same query via solr runs successfully. Where is the problem in my installation of node.js

Answer

Actually Node.js allow only read option from solr by supposing format of query prefix like http://ip-of-system/solr/select/. In my case I was also giving solr collection name. By removing collection name, above problem was removed. query new format will be like

http://localhost:9090/solr/select?q=online&wt=json&indent=true