AUTH-1337: fix url path

This commit is contained in:
Austin Cherry 2019-01-24 14:42:13 -06:00
parent 2f59b8ac22
commit 9db4b7fdfb
1 changed files with 2 additions and 3 deletions

View File

@ -10,7 +10,6 @@ import (
"net/http" "net/http"
"net/url" "net/url"
"os" "os"
"path/filepath"
"time" "time"
"github.com/cloudflare/cloudflared/cmd/cloudflared/encrypter" "github.com/cloudflare/cloudflared/cmd/cloudflared/encrypter"
@ -52,7 +51,7 @@ func Run(transferURL *url.URL, resourceName, key, value, path string, shouldEncr
var resourceData []byte var resourceData []byte
if shouldEncrypt { if shouldEncrypt {
buf, key, err := transferRequest(baseStoreURL + filepath.Join("transfer", encrypterClient.PublicKey())) buf, key, err := transferRequest(baseStoreURL + "transfer/" + encrypterClient.PublicKey())
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -68,7 +67,7 @@ func Run(transferURL *url.URL, resourceName, key, value, path string, shouldEncr
resourceData = decrypted resourceData = decrypted
} else { } else {
buf, _, err := transferRequest(baseStoreURL + filepath.Join(encrypterClient.PublicKey())) buf, _, err := transferRequest(baseStoreURL + encrypterClient.PublicKey())
if err != nil { if err != nil {
return nil, err return nil, err
} }