Node.js solrProxy访问被拒绝

Node.js solrProxy access denied

本文关键字:拒绝 访问 solrProxy js Node      更新时间:2023-09-26

我必须使用代理(node.js)来保护solr。我遵循了本指南并执行了以下步骤。

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

它给出以下错误

solrProxy: access denied

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

实际上Node.js只允许从solr读取选项,假设查询前缀的格式为http://ip-of-system/solr/select/。在我的案例中,我也给出了solr集合的名称。通过删除集合名称,消除了上述问题。查询新格式将类似

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