ssl - Jetty - ipaccess per connector?
问题描述
Let's say I am enabling the ipaccess
module on jetty:
jetty-ipaccess.xml
<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_3.dtd">
<!-- =============================================================== -->
<!-- The IP Access Handler -->
<!-- =============================================================== -->
<Configure id="Server" class="org.eclipse.jetty.server.Server">
<Call name="insertHandler">
<Arg>
<New id="IPAccessHandler" class="org.eclipse.jetty.server.handler.IPAccessHandler">
<Set name="white">
<Array type="String">
<Item>127.0.0.1</Item>
<Item>192.168.1.168</Item>
</Array>
</Set>
<Set name="whiteListByPath">false</Set>
</New>
</Arg>
</Call>
</Configure>
Then I enable it with jetty/home/start.jar --add-to-start=ipaccess
But I want this filter to only apply to the http connector. I do not want it to apply to my https connector.
How do I configure it so that it only affects the http
module, not the https
module?
NOTE: In Jetty 10 this ipaccess module is replaced with another module:
https://github.com/eclipse/jetty.project/commit/3a4da94e1a69ee4c9cd3c936f50d58ee3440188e
解决方案
答案是这还不可能,因为分配 IPAccessHandler 或 InetAccessHandler 只有在您使用 jetty 的编程版本时才有可能。不是当你用start.jar
.
所以我创建了问题:https ://github.com/eclipse/jetty.project/issues/3562
我创建了一个 PR 来解决这个问题:https ://github.com/eclipse/jetty.project/pull/3572
gregw @github在这里接受并扩展它https://github.com/eclipse/jetty.project/pull/3576
一旦这是在 9.4.x 版本中,我将一切就绪。
推荐阅读
- wpf - 除非用户单击不同的子控件,否则如何将焦点设置为默认子控件?
- docker - 将 s3 连接器与用于 kafka 的landoop docker 容器一起使用时出错
- php - wordpress 评论部分没有表单标签
- azure - 更新到 k8s v1.11 后出现错误:“无法运行 Kubelet:无法初始化云提供商“azure”:没有为 AAD 应用程序提供凭据”
- bash - Bash 脚本在 if 条件下无法解释地退出
- c++ - C++块作用域extern声明链接,混淆C++标准解释
- salesforce-service-cloud - Salesforce 开发和配置
- angularjs - Pass Angular object property through variable?
- python - 在具有 multiLine=True 的 Windows 上 spark read.csv 会产生奇怪的 unicode 结果
- sql - 计算给定时间段内相同记录存在的次数