Skip to content

Commit

Permalink
bug: trim authkey in tailscale provider
Browse files Browse the repository at this point in the history
  • Loading branch information
almeidapaulopt committed Nov 24, 2024
1 parent 37fcd62 commit f5e0d83
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions internal/proxyproviders/tailscale/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package tailscale
import (
"path"
"path/filepath"
"strings"

"github.com/rs/zerolog"
"tailscale.com/tsnet"
Expand All @@ -28,9 +29,10 @@ func New(log zerolog.Logger, name string, provider *config.TailscaleServerConfig
datadir := filepath.Join(config.Config.Tailscale.DataDir, name)

return &Client{
log: log.With().Str("tailscale", name).Logger(),
Hostname: name,
AuthKey: provider.AuthKey,
log: log.With().Str("tailscale", name).Logger(),
Hostname: name,
// make sure the auth key is trimmed
AuthKey: strings.TrimSpace(provider.AuthKey),
datadir: datadir,
controlURL: provider.ControlURL,
}, nil
Expand Down

0 comments on commit f5e0d83

Please sign in to comment.