太阳黑子heroku websolr授权

ani*_*ena 5 heroku sunspot websolr rsolr

我们使用sunspot-rails连接到Heroku上的websolr.Websolr提供授权功能来保护读取和更新调用.此授权功能要求在每次调用SOLR时都有三个额外的http标头.我试图找到一种方法来添加这些http标头到每个来自太阳黑子的调用.以下文章展示了如何为rsolr而不是sunspot - https://github.com/onemorecloud/websolr-demo-advanced-auth.https://devcenter.heroku.com/articles/websolr上的官方heroku文档几乎没有关于授权的信息.有没有办法通过太阳黑子改变http标头?

pol*_*iro 2

您可以自定义 Sunspot 会话中使用的连接类。您已经在这个要点中看到了一个示例: https ://gist.github.com/nz/6243059