Skip to content

Commit 6f1286a

Browse files
committed
address bug in matcher.go
1 parent 8375547 commit 6f1286a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

modules/caddyhttp/fileserver/matcher.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,15 +181,15 @@ func (MatchFile) CELLibrary(ctx caddy.Context) (cel.Library, error) {
181181
root = values["root"][0]
182182
}
183183

184-
var try_policy string
184+
var tryPolicy string
185185
if len(values["try_policy"]) > 0 {
186-
root = values["try_policy"][0]
186+
tryPolicy = values["try_policy"][0]
187187
}
188188

189189
m := MatchFile{
190190
Root: root,
191191
TryFiles: values["try_files"],
192-
TryPolicy: try_policy,
192+
TryPolicy: tryPolicy,
193193
SplitPath: values["split_path"],
194194
}
195195

modules/caddyhttp/reverseproxy/selectionpolicies.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ func (ClientIPHashSelection) Select(pool UpstreamPool, req *http.Request, _ http
415415
}
416416

417417
// UnmarshalCaddyfile sets up the module from Caddyfile tokens.
418-
func (r *ClientIPHashSelection) UnmarshalCaddyfile(d *caddyfile.Dispenser) error {
418+
func (*ClientIPHashSelection) UnmarshalCaddyfile(d *caddyfile.Dispenser) error {
419419
for d.Next() {
420420
if d.NextArg() {
421421
return d.ArgErr()

0 commit comments

Comments
 (0)