代码之家  ›  专栏  ›  技术社区  ›  Lasagna Cat

在IIS7管理器中的“HTTP响应头”模块中添加自定义响应头,如果无法访问web,则可以使用。配置文件?

  •  1
  • Lasagna Cat  · 技术社区  · 8 年前

    我正试图插入一个自定义响应标题,以符合启用HST的要求,因为当前布局面临我们网络安全审计的风险。

    I am referencing this previous StackOverflow thread web.config 将代码归档、复制并粘贴到其中。

    I tried to follow directions to access using this link, but I did not get far because I do not have EFTAdHoc subfolder under Default Web Site on step 3.

    我很好奇,如果我这样设置自定义响应头是否仍然可以:

    enter image description here

    1 回复  |  直到 8 年前
        1
  •  3
  •   Victor Leontyev    8 年前

    我很好奇,如果我这样设置自定义响应头是否仍然可以:

    thread 您之前提到的是正确的,因为它只在HTTPS请求时设置头。

    您可以使用IIS管理器来实现这一点。

    1) 转到URL重写 enter image description here 3) 填写如下字段: enter image description here