Skip to content

Commit b149630

Browse files
authored
Merge pull request #182 from terminusdb/token_fix
Adding token auth rather than API_TOKEN special header
2 parents d4a95bb + adab880 commit b149630

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/dispatchRequest.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ function DispatchRequest(url, action, payload, local_auth, remote_auth = null, c
7878
} else if (local_auth && local_auth.type === 'jwt') {
7979
options.headers = { Authorization: `Bearer ${local_auth.key}` };
8080
} else if (local_auth && local_auth.type === 'apikey') {
81-
options.headers = { API_TOKEN: local_auth.key };
81+
options.headers = { Authorization: `Token ${local_auth.key}` };
8282
}
8383

8484
/*

0 commit comments

Comments
 (0)