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
6fdc83fa
Commit
6fdc83fa
authored
Nov 04, 2015
by
xenolf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix regression: Ensure TLS defaults are added by LE handlers.
parent
d36685ac
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
2 deletions
+13
-2
caddy/letsencrypt/letsencrypt.go
caddy/letsencrypt/letsencrypt.go
+4
-0
caddy/setup/tls.go
caddy/setup/tls.go
+9
-2
No files found.
caddy/letsencrypt/letsencrypt.go
View file @
6fdc83fa
...
...
@@ -12,6 +12,7 @@ import (
"strings"
"time"
"github.com/mholt/caddy/caddy/setup"
"github.com/mholt/caddy/middleware"
"github.com/mholt/caddy/middleware/redirect"
"github.com/mholt/caddy/server"
...
...
@@ -338,6 +339,9 @@ func autoConfigure(allConfigs []server.Config, cfgIndex int) []server.Config {
cfg
.
TLS
.
Certificate
=
storage
.
SiteCertFile
(
cfg
.
Host
)
cfg
.
TLS
.
Key
=
storage
.
SiteKeyFile
(
cfg
.
Host
)
cfg
.
TLS
.
Enabled
=
true
// Ensure all defaults are set for the TLS config
setup
.
SetDefaultTLSParams
(
cfg
)
if
cfg
.
Port
==
""
{
cfg
.
Port
=
"https"
}
...
...
caddy/setup/tls.go
View file @
6fdc83fa
...
...
@@ -6,6 +6,7 @@ import (
"strings"
"github.com/mholt/caddy/middleware"
"github.com/mholt/caddy/server"
)
func
TLS
(
c
*
Controller
)
(
middleware
.
Middleware
,
error
)
{
...
...
@@ -78,6 +79,14 @@ func TLS(c *Controller) (middleware.Middleware, error) {
}
}
SetDefaultTLSParams
(
c
.
Config
)
return
nil
,
nil
}
// SetDefaultTLSParams sets the default TLS cipher suites, protocol versions and server preferences
// of a server.Config if they were not previously set.
func
SetDefaultTLSParams
(
c
*
server
.
Config
)
{
// If no ciphers provided, use all that Caddy supports for the protocol
if
len
(
c
.
TLS
.
Ciphers
)
==
0
{
c
.
TLS
.
Ciphers
=
supportedCiphers
...
...
@@ -96,8 +105,6 @@ func TLS(c *Controller) (middleware.Middleware, error) {
// Prefer server cipher suites
c
.
TLS
.
PreferServerCipherSuites
=
true
return
nil
,
nil
}
// Map of supported protocols
...
...
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