mixchen01
V2EX  ›  问与答

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

  •  
  •   mixchen01 · Jul 29, 2018 · 2159 views
    This topic created in 2843 days ago, the information mentioned may be changed or developed.

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

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

    成功以后再去申请
    flowfire
        9
    flowfire  
       Jul 30, 2018 via iPhone
    tip: example.com 可以作为示例域名使用而不需要任何授权,test.com 不行。。。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3373 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 42ms · UTC 13:04 · PVG 21:04 · LAX 06:04 · JFK 09:04
    ♥ Do have faith in what you're doing.