2016-05-13 65 views
0

我必须使用代理(node.js)来保护solr。我已按照this guide执行以下步骤。Node.js solrProxy访问被拒绝

npm install solr-security-proxy 

,然后运行它

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

,并开始SOLR像

java -jar start.jar 

当我尝试通过代理来查询Solr的像

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

它给follwoing错误

solrProxy: access denied 

通过solr的相同查询成功运行。我的安装node.js中的问题在哪里

回答

1

实际上Node.js只允许从solr读取选项,通过假设查询前缀的格式如http://ip-of-system/solr/select/。在我的情况下,我也给solr收集名称。通过删除集合名称,上面的问题被删除。查询新格式将会像

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