Skip to content

Commit 0afb73d

Browse files
committed
fixed bug in api key header routine
1 parent b0e74be commit 0afb73d

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

gremlinapi/http_clients.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,10 @@ def header(cls, *args, **kwargs):
3737
bearer_token = kwargs.get('bearer_token', GremlinAPIConfig.bearer_token)
3838
header = dict()
3939
if api_key and not bearer_token:
40-
header['Authorization'] = 'Key {api_key}'
40+
if "Key" in api_key:
41+
header['Authorization'] = api_key
42+
else:
43+
header['Authorization'] = f'Key {api_key}'
4144
if bearer_token:
4245
if "Bearer" in bearer_token:
4346
header['Authorization'] = bearer_token

0 commit comments

Comments
 (0)