Skip to content

Commit

Permalink
fix(caddy): surrogate-related config parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
Vincent Jordan committed Feb 6, 2024
1 parent 66e4f8e commit 390fb74
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions plugins/caddy/configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -388,8 +388,9 @@ func parseConfiguration(cfg *Configuration, h *caddyfile.Dispenser, isBlocking b
case "api_key":
cdn.APIKey = h.RemainingArgs()[0]
case "dynamic":
if len(h.RemainingArgs()) > 0 {
cdn.Dynamic, _ = strconv.ParseBool(h.RemainingArgs()[0])
args := h.RemainingArgs()
if len(args) > 0 {
cdn.Dynamic, _ = strconv.ParseBool(args[0])
}
case "hostname":
cdn.Hostname = h.RemainingArgs()[0]
Expand Down

0 comments on commit 390fb74

Please sign in to comment.