Skip to content

Commit

Permalink
Use insecure_off instead
Browse files Browse the repository at this point in the history
  • Loading branch information
francislavoie committed Mar 2, 2022
1 parent 2eb1edb commit 35e68be
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions caddyconfig/httpcaddyfile/serveroptions.go
Expand Up @@ -157,11 +157,11 @@ func unmarshalCaddyfileServerOptions(d *caddyfile.Dispenser) (interface{}, error
serverOpts.ExperimentalHTTP3 = true

case "strict_sni_host":
if d.NextArg() && d.Val() != "off" && d.Val() != "on" {
return nil, d.Errf("strict_sni_host only supports 'on' or 'off', got '%s'", d.Val())
if d.NextArg() && d.Val() != "insecure_off" && d.Val() != "on" {
return nil, d.Errf("strict_sni_host only supports 'on' or 'insecure_off', got '%s'", d.Val())
}
boolVal := true
if d.Val() == "off" {
if d.Val() == "insecure_off" {
boolVal = false
}
serverOpts.StrictSNIHost = &boolVal
Expand Down
Expand Up @@ -4,7 +4,7 @@
idle 90s
}
protocol {
strict_sni_host off
strict_sni_host insecure_off
}
}
servers :80 {
Expand Down

0 comments on commit 35e68be

Please sign in to comment.