auth: more validation

This commit is contained in:
Łukasz Magiera
2019-07-24 00:38:52 +02:00
parent 6554db3e5f
commit 16353dfebe
3 changed files with 38 additions and 23 deletions
+1 -1
View File
@@ -44,7 +44,7 @@ func getAPI(ctx *cli.Context) (api.API, error) {
if err != nil {
log.Warnf("Couldn't load CLI token, capabilities may be limited: %w", err)
} else {
headers = map[string][]string{}
headers = http.Header{}
headers.Add("Authorization", "Bearer "+string(token))
}