mirror of
https://github.com/caddyserver/caddy.git
synced 2025-06-03 05:34:16 -04:00
Merge pull request #1431 from mholt/issue1388c
Fix for #1388 starting with no Caddyfile
This commit is contained in:
commit
2417d70bcb
@ -55,6 +55,10 @@ 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
|
||||
|
Loading…
x
Reference in New Issue
Block a user