mirror of
https://github.com/caddyserver/caddy.git
synced 2025-10-19 07:43:17 +00:00
Rename caddy2 -> caddy
Removes the version from the package name
This commit is contained in:
parent
b8e7453fef
commit
5137859e47
48 changed files with 199 additions and 193 deletions
|
@ -7,7 +7,7 @@ import (
|
|||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/caddyserver/caddy2"
|
||||
"github.com/caddyserver/caddy"
|
||||
"github.com/go-acme/lego/challenge/tlsalpn01"
|
||||
"github.com/mholt/certmagic"
|
||||
)
|
||||
|
@ -20,7 +20,7 @@ type ConnectionPolicies []*ConnectionPolicy
|
|||
// TLSConfig converts the group of policies to a standard-lib-compatible
|
||||
// TLS configuration which selects the first matching policy based on
|
||||
// the ClientHello.
|
||||
func (cp ConnectionPolicies) TLSConfig(ctx caddy2.Context) (*tls.Config, error) {
|
||||
func (cp ConnectionPolicies) TLSConfig(ctx caddy.Context) (*tls.Config, error) {
|
||||
// set up each of the connection policies
|
||||
for i, pol := range cp {
|
||||
// matchers
|
||||
|
@ -110,7 +110,7 @@ type ConnectionPolicy struct {
|
|||
stdTLSConfig *tls.Config
|
||||
}
|
||||
|
||||
func (p *ConnectionPolicy) buildStandardTLSConfig(ctx caddy2.Context) error {
|
||||
func (p *ConnectionPolicy) buildStandardTLSConfig(ctx caddy.Context) error {
|
||||
tlsAppIface, err := ctx.App("tls")
|
||||
if err != nil {
|
||||
return fmt.Errorf("getting tls app: %v", err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue