简体   繁体   English

Solr Jetty 8通过IP限制访问

[英]Solr Jetty 8 restrict access by IP

I was wondering whats the best way to limit access to a solr instance running on top of jetty 8.1 based on IP address. 我想知道什么是最好的方法来限制对基于IP地址运行在jetty 8.1之上的solr实例的访问。 I could do it on the firewall level, but I would rather have it on the web server level. 我可以在防火墙级别上做到这一点,但我宁愿在Web服务器级别上做到这一点。 I saw many references to articles which point the use of HtAccess file but apparently in newer jetty versions > 6, this component is no longer part of jetty. 我看到了许多引用文章的参考,这些文章指出了HtAccess文件的使用,但显然在版本大于6的最新码头版本中,此组件不再是码头部分。 So I would imagine its fairly simple to restrict access to only a few select IPs but I cant find any documentation on that topic anywhere. 因此,我想将访问权限限制为仅几个选定IP相当简单,但是我在任何地方都找不到有关该主题的任何文档。 Any help is appreciated. 任何帮助表示赞赏。 Thanks! 谢谢!

Try out the IPAccessHandler in jetty 8, it is in the jetty-server package. 试用jetty 8中的IPAccessHandler,它位于jetty-server软件包中。

http://git.eclipse.org/c/jetty/org.eclipse.jetty.project.git/tree/jetty- server/src/main/java/org/eclipse/jetty/server/handler/IPAccessHandler.java?h=jetty-8 http://git.eclipse.org/c/jetty/org.eclipse.jetty.project.git/tree/jetty- server / src / main / java / org / eclipse / jetty / server / handler / IPAccessHandler.java? h =码头8

[edit] the docs page [编辑]文档页面

http://www.eclipse.org/jetty/documentation/current/ipaccess-handler.html http://www.eclipse.org/jetty/documentation/current/ipaccess-handler.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM