V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
mixchen01
V2EX  ›  问与答

能否只让子域名加入 HSTS 列表?

  •  
  •   mixchen01 · 2018-07-29 22:01:09 +08:00 · 1688 次点击
    这是一个创建于 2091 天前的主题,其中的信息可能已经有所发展或是发生改变。

    比如我有个域名是 test.com
    我能不能只让其中一个子域名 blog.test.com 加入 HSTS 列表?

    9 条回复    2018-07-30 09:08:49 +08:00
    EsWann
        1
    EsWann  
       2018-07-29 22:11:10 +08:00
    不能
    mixchen01
        2
    mixchen01  
    OP
       2018-07-29 22:21:30 +08:00
    @EsWann https://chromium.googlesource.com/chromium/src/net/+/master/http/transport_security_state_static.json#650 可以看到,一部分域名 include_subdomains 为 false, 难道是例外?
    mixchen01
        3
    mixchen01  
    OP
       2018-07-29 22:25:58 +08:00
    EsWann
        4
    EsWann  
       2018-07-29 22:34:45 +08:00 via Android
    加入 HSTS 列表整个域名都在,分清楚加入列表和只写请求头
    1423
        5
    1423  
       2018-07-29 22:37:11 +08:00
    结啥贴。。
    楼主说的是“加入 HSTS 列表”,应该是指的“ HSTS Preload List ”,而不是仅仅 http 的头部
    https://hstspreload.org/ 明确提到要求 includeSubDomains
    shansing
        6
    shansing  
       2018-07-29 23:15:14 +08:00 via iPhone
    如果你把 .test.com 当作公共后缀提交给某个列表(忘了叫什么了,里面大多是通用域名后缀或者国别域名后缀,用来控制 Cookie 域,也被 Firefox 当作 URL 标识主域名的依据等),也许就可以只添加 blog.test.com 了。
    orzfly
        7
    orzfly  
       2018-07-30 01:55:55 +08:00   ❤️ 1
    Showfom
        8
    Showfom  
       2018-07-30 08:47:18 +08:00
    加入这个列表 https://publicsuffix.org/

    成功以后再去申请
    flowfire
        9
    flowfire  
       2018-07-30 09:08:49 +08:00 via iPhone
    tip: example.com 可以作为示例域名使用而不需要任何授权,test.com 不行。。。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   934 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 19:58 · PVG 03:58 · LAX 12:58 · JFK 15:58
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.