Commit 71c14fa1 authored by Matthew Holt's avatar Matthew Holt

Make sure Root is set for all new SiteConfigs

This situation typically only arises in tests...
parent ff22fbd7
......@@ -155,8 +155,7 @@ func GetConfig(addrKey string) *SiteConfig {
// this shouldn't happen except in tests
newContext()
}
cfg := new(SiteConfig)
cfg.TLS = new(caddytls.Config)
cfg := &SiteConfig{Root: Root, TLS: new(caddytls.Config)}
defaultCtx := contexts[len(contexts)-1]
defaultCtx.siteConfigs = append(defaultCtx.siteConfigs, cfg)
defaultCtx.keysToSiteConfigs[addrKey] = cfg
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment