Skip to content

Commit 83662e7

Browse files
fixes #135 (#140)
1 parent 82d072e commit 83662e7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

kong/utils.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,10 @@ func GetKongClient(opt Config) (*kong.Client, error) {
7878

7979
var headers []string
8080
if opt.APIKey != "" {
81-
headers = append(headers, fmt.Sprintf("kong-admin-token:%v", opt.APIKey))
81+
headers = append(headers, fmt.Sprintf("apikey:%v", opt.APIKey))
82+
}
83+
if opt.AdminToken != "" {
84+
headers = append(headers, fmt.Sprintf("kong-admin-token:%v", opt.AdminToken))
8285
}
8386
if opt.Username != "" || opt.Password != "" {
8487
headers = append(headers, fmt.Sprintf("Authorization: Basic %v", basicAuth(opt.Username, opt.Password)))

0 commit comments

Comments
 (0)