Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
caddy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Łukasz Nowak
caddy
Commits
2417d70b
Commit
2417d70b
authored
Feb 14, 2017
by
Toby Allen
Committed by
GitHub
Feb 14, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1431 from mholt/issue1388c
Fix for #1388 starting with no Caddyfile
parents
ce7d3db1
1a761207
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
caddyhttp/httpserver/plugin.go
caddyhttp/httpserver/plugin.go
+4
-0
No files found.
caddyhttp/httpserver/plugin.go
View file @
2417d70b
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment