Merge pull request #136 from foomo/fix-decode-string

fix(cloudflare/cloudflared): fix decode string
This commit is contained in:
Kevin Franklin Kim 2024-08-22 08:50:31 +02:00 committed by GitHub
commit 38a87b84ae
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -138,6 +138,10 @@ func NewCommand(l log.Logger, cloudflared *Cloudflared, opts ...CommandOption) (
{
Name: "dns",
Description: "HostnameRoute a hostname by creating a DNS CNAME record to a tunnel",
Flags: func(ctx context.Context, r *readline.Readline, fs *readline.FlagSets) error {
fs.Default().Bool("overwrite-dns", false, "Overwrites existing DNS records")
return nil
},
Args: tree.Args{
{
Name: "tunnel",
@ -274,8 +278,8 @@ func (c *Command) tunnelCreate(ctx context.Context, r *readline.Readline) error
return err
}
var outDec []byte
if _, err := base64.StdEncoding.Decode(outDec, out); err != nil {
outDec, err := base64.StdEncoding.DecodeString(string(out))
if err != nil {
return err
}