Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有人们可以随意部署的 tomcat 应用程序(war 文件)。例如,通过在 Coyote 中使用 http/https 连接器,或使用 mod_jk/mod_proxy 让 Apache 处理传入的 http/https。
我遇到的一个问题是我需要从应用程序中找出部署服务器的公共地址。有没有办法从传入的请求中提取这个?例如,当应用程序通过 mod_jk 和 ajp13 后端部署时,我仍然想知道该请求最初是对https://myserver.com完成的。
使用 jsonip,这样你就可以在启动时完成,不需要等待请求。