summaryrefslogtreecommitdiff
path: root/caddyconfig/httpcaddyfile/httptype.go
diff options
context:
space:
mode:
authorMatthew Holt <mholt@users.noreply.github.com>2019-08-21 15:23:00 -0600
committerMatthew Holt <mholt@users.noreply.github.com>2019-08-21 15:23:00 -0600
commit8420a2f250cf467a06c0081cb47a8f73b70e7f3f (patch)
tree3414aeedaa257ab98353f3e0a035be666f0f0cbb /caddyconfig/httpcaddyfile/httptype.go
parent59910923d10a99f694445ebded559cfc845eb4bd (diff)
Clean up Dispenser and filename handling a bit
Diffstat (limited to 'caddyconfig/httpcaddyfile/httptype.go')
-rw-r--r--caddyconfig/httpcaddyfile/httptype.go6
1 files changed, 5 insertions, 1 deletions
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,
})