caddy/caddyconfig/caddyfile
Francis Lavoie a8d45277ca
caddyfile: Fix `import` replacing unrelated placeholders (#4129)
* caddyfile: Fix `import` replacing unrelated placeholders

See https://caddy.community/t/snippet-issue-works-outside-snippet/12231

So it turns out that `NewReplacer()` gives a replacer with some global defaults (like `{env.*}` and some system and time placeholders), which is not ideal when running `import` because we just want to replace `{args.*}` only, and nothing else.

* caddyfile: Add test
2021-04-22 18:29:04 -06:00
..
testdata caddyfile: reject cyclic imports (#4022) 2021-04-09 12:06:25 -06:00
adapter.go caddyfile: Normalize line endings before comparing fmt result (#4103) 2021-04-02 11:55:34 -06:00
dispenser.go
dispenser_test.go
formatter.go
formatter_fuzz.go fuzz: fix the FuzzFormat comparison (#4117) 2021-04-15 23:03:54 +00:00
formatter_test.go
importgraph.go caddyfile: reject cyclic imports (#4022) 2021-04-09 12:06:25 -06:00
lexer.go caddyfile: reject cyclic imports (#4022) 2021-04-09 12:06:25 -06:00
lexer_fuzz.go ci: fuzz: add 4 more fuzzing targets (#4105) 2021-04-08 11:45:19 -06:00
lexer_test.go
parse.go caddyfile: Fix `import` replacing unrelated placeholders (#4129) 2021-04-22 18:29:04 -06:00
parse_test.go caddyfile: reject cyclic imports (#4022) 2021-04-09 12:06:25 -06:00