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
nexedi
caddy
Commits
c3e64636
Commit
c3e64636
authored
Nov 02, 2015
by
Matthew Holt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
A few comments, slight tweaks
parent
d18cf12f
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
4 deletions
+5
-4
caddy/caddy.go
caddy/caddy.go
+1
-1
caddy/config.go
caddy/config.go
+1
-0
caddy/helpers.go
caddy/helpers.go
+3
-3
No files found.
caddy/caddy.go
View file @
c3e64636
...
@@ -39,7 +39,7 @@ var (
...
@@ -39,7 +39,7 @@ var (
// The name and version of the application.
// The name and version of the application.
AppName
,
AppVersion
string
AppName
,
AppVersion
string
// If true, initialization will not show any output.
// If true, initialization will not show any
informative
output.
Quiet
bool
Quiet
bool
// DefaultInput is the default configuration to use when config input is empty or missing.
// DefaultInput is the default configuration to use when config input is empty or missing.
...
...
caddy/config.go
View file @
c3e64636
...
@@ -278,6 +278,7 @@ func arrangeBindings(allConfigs []server.Config) (Group, error) {
...
@@ -278,6 +278,7 @@ func arrangeBindings(allConfigs []server.Config) (Group, error) {
func
resolveAddr
(
conf
server
.
Config
)
(
resolvAddr
*
net
.
TCPAddr
,
warnErr
error
,
fatalErr
error
)
{
func
resolveAddr
(
conf
server
.
Config
)
(
resolvAddr
*
net
.
TCPAddr
,
warnErr
error
,
fatalErr
error
)
{
bindHost
:=
conf
.
BindHost
bindHost
:=
conf
.
BindHost
// TODO: Do we even need the port? Maybe we just need to look up the host.
resolvAddr
,
warnErr
=
net
.
ResolveTCPAddr
(
"tcp"
,
net
.
JoinHostPort
(
bindHost
,
conf
.
Port
))
resolvAddr
,
warnErr
=
net
.
ResolveTCPAddr
(
"tcp"
,
net
.
JoinHostPort
(
bindHost
,
conf
.
Port
))
if
warnErr
!=
nil
{
if
warnErr
!=
nil
{
// Most likely the host lookup failed or the port is unknown
// Most likely the host lookup failed or the port is unknown
...
...
caddy/helpers.go
View file @
c3e64636
...
@@ -16,9 +16,9 @@ func init() {
...
@@ -16,9 +16,9 @@ func init() {
letsencrypt
.
OnChange
=
func
()
error
{
return
Restart
(
nil
)
}
letsencrypt
.
OnChange
=
func
()
error
{
return
Restart
(
nil
)
}
}
}
// isLocalhost returns true if
the string
looks explicitly like a localhost address.
// isLocalhost returns true if
host
looks explicitly like a localhost address.
func
isLocalhost
(
s
string
)
bool
{
func
isLocalhost
(
host
string
)
bool
{
return
s
==
"localhost"
||
s
==
"::1"
||
strings
.
HasPrefix
(
s
,
"127."
)
return
host
==
"localhost"
||
host
==
"::1"
||
strings
.
HasPrefix
(
host
,
"127."
)
}
}
// checkFdlimit issues a warning if the OS max file descriptors is below a recommended minimum.
// checkFdlimit issues a warning if the OS max file descriptors is below a recommended minimum.
...
...
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