mirror of
https://github.com/caddyserver/caddy.git
synced 2025-06-06 07:04:34 -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 {
|
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…
x
Reference in New Issue
Block a user