summaryrefslogtreecommitdiff
path: root/modules/caddyhttp/reverseproxy
diff options
context:
space:
mode:
authorMatthew Holt <mholt@users.noreply.github.com>2020-02-14 11:00:16 -0700
committerMatthew Holt <mholt@users.noreply.github.com>2020-02-14 11:01:09 -0700
commit15bf9c196c5972051f40ebadf50811bd06e328dd (patch)
tree03362b73a9bdd923bf4f252e346a8441f5de04b0 /modules/caddyhttp/reverseproxy
parenteb80165583776d878256359f1635ffa9a17f0171 (diff)
caddyfile: Refactor; NewFromNextSegment(); fix repeated matchers
Now multiple instances of the same matcher can be used within a named matcher without overwriting previous ones.
Diffstat (limited to 'modules/caddyhttp/reverseproxy')
-rw-r--r--modules/caddyhttp/reverseproxy/caddyfile.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/caddyhttp/reverseproxy/caddyfile.go b/modules/caddyhttp/reverseproxy/caddyfile.go
index f29050f..d08e7f1 100644
--- a/modules/caddyhttp/reverseproxy/caddyfile.go
+++ b/modules/caddyhttp/reverseproxy/caddyfile.go
@@ -114,7 +114,7 @@ func (h *Handler) UnmarshalCaddyfile(d *caddyfile.Dispenser) error {
if !ok {
return d.Errf("load balancing policy module '%s' is not a Caddyfile unmarshaler", mod)
}
- err = unm.UnmarshalCaddyfile(d.NewFromNextTokens())
+ err = unm.UnmarshalCaddyfile(d.NewFromNextSegment())
if err != nil {
return err
}
@@ -401,7 +401,7 @@ func (h *Handler) UnmarshalCaddyfile(d *caddyfile.Dispenser) error {
if !ok {
return d.Errf("transport module '%s' is not a Caddyfile unmarshaler", mod)
}
- err = unm.UnmarshalCaddyfile(d.NewFromNextTokens())
+ err = unm.UnmarshalCaddyfile(d.NewFromNextSegment())
if err != nil {
return err
}