在 VisualSVN 上实施 HTTP 严格传输安全 (HSTS)

Implement HTTP Strict Transport Security (HSTS) on VisualSVN

我们的网络安全建议引入 HTTP Strict-Transport-Security 响应 header,但在 VisualSVN(或其配置)中看不到任何地方可以执行此操作。

这适用于 VisualSVN Enterprise 4.2.2(使用 A​​pache 1.10.6)运行 Windows 2019数据中心.

我没有看到 Apache 的单独安装,服务器上没有 httpd.exe 并且 httpd.conf 文件中有一个 header 警告,建议 conf 将被覆盖when/if VisualSVN 服务已启动。

您可以将以下行添加到 %VISUALSVN_SERVER%conf\httpd-custom.conf 文件并重新启动 VisualSVN 服务器服务:

Header always set Strict-Transport-Security "max-age=31536000"

请注意,根据您的要求,您可能需要将 max-age 值替换为另一个值。