From 8420a2f250cf467a06c0081cb47a8f73b70e7f3f Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Wed, 21 Aug 2019 15:23:00 -0600 Subject: Clean up Dispenser and filename handling a bit --- caddyconfig/httpcaddyfile/httptype.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'caddyconfig/httpcaddyfile/httptype.go') diff --git a/caddyconfig/httpcaddyfile/httptype.go b/caddyconfig/httpcaddyfile/httptype.go index 42c1be5..e7e7c87 100644 --- a/caddyconfig/httpcaddyfile/httptype.go +++ b/caddyconfig/httpcaddyfile/httptype.go @@ -38,6 +38,10 @@ func init() { type ServerType struct { } +// TODO: customize directive ordering + +// TODO: hide caddyfile when serving static files + // Setup makes a config from the tokens. func (st ServerType) Setup(originalServerBlocks []caddyfile.ServerBlock, options map[string]string) (*caddy.Config, []caddyconfig.Warning, error) { @@ -88,7 +92,7 @@ func (st ServerType) Setup(originalServerBlocks []caddyfile.ServerBlock, } if dirFunc, ok := registeredDirectives[dir]; ok { results, err := dirFunc(Helper{ - Dispenser: segment.NewDispenser(), + Dispenser: caddyfile.NewDispenser(segment), warnings: &warnings, matcherDefs: matcherDefs, }) -- cgit v1.2.3