diff options
| author | Matthew Holt <mholt@users.noreply.github.com> | 2022-09-16 09:42:05 -0600 | 
|---|---|---|
| committer | Matthew Holt <mholt@users.noreply.github.com> | 2022-09-16 09:42:05 -0600 | 
| commit | 258071d857aa8d1524161cb7273f960f24162ce9 (patch) | |
| tree | 39d84387badd37add7f67118f7067628ed1e1293 /modules/caddytls | |
| parent | b6cec3789342c2408d878359d4ed07e3789611ac (diff) | |
caddytls: Debug log on implicit tailscale error (#5041)
Diffstat (limited to 'modules/caddytls')
| -rw-r--r-- | modules/caddytls/certmanagers.go | 10 | 
1 files changed, 5 insertions, 5 deletions
diff --git a/modules/caddytls/certmanagers.go b/modules/caddytls/certmanagers.go index 8c8d701..de7abf9 100644 --- a/modules/caddytls/certmanagers.go +++ b/modules/caddytls/certmanagers.go @@ -66,7 +66,9 @@ func (ts Tailscale) canHazCertificate(ctx context.Context, hello *tls.ClientHell  	status, err := tscert.GetStatus(ctx)  	if err != nil {  		if ts.Optional { -			return false, nil // ignore error if we don't expect/require it to work anyway +			// ignore error if we don't expect/require it to work anyway, but log it for debugging +			ts.logger.Debug("error getting tailscale status", zap.Error(err), zap.String("server_name", hello.ServerName)) +			return false, nil  		}  		return false, err  	} @@ -80,8 +82,7 @@ func (ts Tailscale) canHazCertificate(ctx context.Context, hello *tls.ClientHell  // UnmarshalCaddyfile deserializes Caddyfile tokens into ts.  // -//     ... tailscale -// +//	... tailscale  func (Tailscale) UnmarshalCaddyfile(d *caddyfile.Dispenser) error {  	for d.Next() {  		if d.NextArg() { @@ -178,8 +179,7 @@ func (hcg HTTPCertGetter) GetCertificate(ctx context.Context, hello *tls.ClientH  // UnmarshalCaddyfile deserializes Caddyfile tokens into ts.  // -//     ... http <url> -// +//	... http <url>  func (hcg *HTTPCertGetter) UnmarshalCaddyfile(d *caddyfile.Dispenser) error {  	for d.Next() {  		if !d.NextArg() {  | 
