V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
lsw0794
V2EX  ›  程序员

jboss http 头中 host 攻击

  •  
  •   lsw0794 · 2018-05-23 17:38:55 +08:00 · 1948 次点击
    这是一个创建于 2159 天前的主题,其中的信息可能已经有所发展或是发生改变。
    请教各位大侠,jboss 无域名,使用 IP 访问。

    web 目录下,有一个 common 子目录
    curl -i -H "Host: www.baidu.com " "http://127.0.0.1:8080/web/common/"
    跳转到 404 页面
    curl -i -H "Host: www.baidu.com " "http://127.0.0.1:8080/web/common"
    返回:
    HTTP/1.1 302 Moved Temporarily
    Location: http://www.baidu.com/web/common/
    Transfer-Encoding: chunked
    Date: Wed, 23 May 2018 13:34:39 GMT
    Server: VPS

    请指教一下,要怎么配置能解决阻止 Location 重定向 http://www.baidu.com/web/common/中 IP 地址 127.0.0.1 被填入 Http 请求头中 host 值 www.baidu.com

    谢谢!
    2 条回复    2018-05-23 20:24:42 +08:00
    w0nglend
        1
    w0nglend  
       2018-05-23 19:51:51 +08:00
    proxy_set_header Host "";
    lsw0794
        2
    lsw0794  
    OP
       2018-05-23 20:24:42 +08:00 via Android
    @w0nglend 这个 jboss 能用,不是 nginx 的?
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2786 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 35ms · UTC 14:43 · PVG 22:43 · LAX 07:43 · JFK 10:43
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.