mirror of
https://github.com/caddyserver/caddy.git
synced 2024-12-23 22:27:38 -05:00
Merge pull request #1431 from mholt/issue1388c
Fix for #1388 starting with no Caddyfile
This commit is contained in:
commit
2417d70bcb
1 changed files with 4 additions and 0 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue