mirror of
https://github.com/caddyserver/caddy.git
synced 2024-12-23 22:27:38 -05:00
Make sure Root is set for all new SiteConfigs
This situation typically only arises in tests...
This commit is contained in:
parent
ff22fbd79a
commit
71c14fa16e
1 changed files with 1 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue