Skip to content

Commit d4127f3

Browse files
committed
fix: duplicated Auhtorization header in konnect_api_request
1 parent c84aefa commit d4127f3

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

app/_plugins/drops/konnect_api_request.rb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,11 @@ def url
3434
end
3535

3636
def headers
37-
h = @yaml['headers'] || []
38-
h.unshift('Authorization: Bearer $KONNECT_TOKEN')
39-
h
37+
@headers ||= begin
38+
h = @yaml['headers'] || []
39+
h.unshift('Authorization: Bearer $KONNECT_TOKEN')
40+
h.uniq
41+
end
4042
end
4143

4244
def config

app/serverless-gateways/reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@ Provisioning a serverless gateway includes creating the serverless Control Plane
7777
status_code: 201
7878
method: POST
7979
headers:
80+
- 'Authorization: Bearer $KONNECT_TOKEN'
8081
- 'Accept: application/json'
8182
- 'Content-Type: application/json'
82-
- 'Authorization: Bearer $KONNECT_TOKEN'
8383
body:
8484

8585
name: serverless-gateway-control-plane

0 commit comments

Comments
 (0)