【问题标题】:AH02429: response header name contains invalid charactersAH02429:响应标头名称包含无效字符
【发布时间】:2019-11-18 02:55:53
【问题描述】:

我正在使用 Apache/2.4.25 (Ubuntu) 和 ssl 证书。我在 error.log 中收到此错误。

[http:error] [pid 17439:tid 140353432684288] [客户端 106.51.133.147:21780] AH02429:响应标头名称“Strict-Transport-Security”包含无效字符,正在中止 请求

ServerName mystaging.cloudapp.net 
Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"

【问题讨论】:

    标签: apache2.4


    【解决方案1】:

    错误消息的标题名称中有尾随空格。

    要么您实际上并没有复制和粘贴您的配置,要么通过其他方式将标题设置为尾随空格。

    【讨论】:

      【解决方案2】:

      标题需要一个尾随冒号。

      Strict-Transport-Security:

      https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Security

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2018-01-04
        • 2019-02-24
        • 1970-01-01
        • 1970-01-01
        • 2017-03-18
        • 2016-12-18
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多