Skip to content

Commit

Permalink
fixes #135 (#140)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevholditch-f3 authored Oct 20, 2021
1 parent 82d072e commit 83662e7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion kong/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,10 @@ func GetKongClient(opt Config) (*kong.Client, error) {

var headers []string
if opt.APIKey != "" {
headers = append(headers, fmt.Sprintf("kong-admin-token:%v", opt.APIKey))
headers = append(headers, fmt.Sprintf("apikey:%v", opt.APIKey))
}
if opt.AdminToken != "" {
headers = append(headers, fmt.Sprintf("kong-admin-token:%v", opt.AdminToken))
}
if opt.Username != "" || opt.Password != "" {
headers = append(headers, fmt.Sprintf("Authorization: Basic %v", basicAuth(opt.Username, opt.Password)))
Expand Down

0 comments on commit 83662e7

Please sign in to comment.