Commit 2417d70b authored by Toby Allen's avatar Toby Allen Committed by GitHub

Merge pull request #1431 from mholt/issue1388c

Fix for #1388 starting with no Caddyfile
parents ce7d3db1 1a761207
...@@ -55,6 +55,10 @@ func init() { ...@@ -55,6 +55,10 @@ func init() {
func hideCaddyfile(cctx caddy.Context) error { func hideCaddyfile(cctx caddy.Context) error {
ctx := cctx.(*httpContext) ctx := cctx.(*httpContext)
for _, cfg := range ctx.siteConfigs { for _, cfg := range ctx.siteConfigs {
// if no Caddyfile exists exit.
if cfg.originCaddyfile == "" {
return nil
}
absRoot, err := filepath.Abs(cfg.Root) absRoot, err := filepath.Abs(cfg.Root)
if err != nil { if err != nil {
return err return err
......
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