Commit 5072d70f authored by Toby Allen's avatar Toby Allen

Fix for #1388 dont attempt to hide Caddyfile if non existant

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