mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-09-29 14:06:36 +08:00
[功能] 更新HTTPS配置,启用HTTP/2支持并优化相关文档
This commit is contained in:
@@ -69,8 +69,8 @@ func TestCreateTLSCertificateAndRenderHTTPSConfig(t *testing.T) {
|
||||
if strings.Contains(result.Version.MainConfig, "allow 127.0.0.1;") {
|
||||
t.Fatal("expected main config to avoid hard-coded allow rules on observability server")
|
||||
}
|
||||
if !strings.Contains(result.Version.RenderedConfig, "listen 443 ssl;") {
|
||||
t.Fatal("expected rendered config to include https server block")
|
||||
if !strings.Contains(result.Version.RenderedConfig, "listen 443 ssl http2;") {
|
||||
t.Fatal("expected rendered config to include https server block with http2 enabled")
|
||||
}
|
||||
if !strings.Contains(result.Version.RenderedConfig, `if ($host != "app.example.com") {`) {
|
||||
t.Fatal("expected rendered config to reject unmatched host headers with 404")
|
||||
|
||||
Reference in New Issue
Block a user