Skip to content

Commit

Permalink
changed to use Authorization instead of X-Nats-Api-Key as preferr…
Browse files Browse the repository at this point in the history
…ed token header/qs
  • Loading branch information
aricart committed Apr 23, 2024
1 parent c57498f commit 4a52f77
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion nhgc/kv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ export class KvImpl extends HttpImpl implements Kv {
opts: KvWatchOpts,
): Promise<KvWatcher> {
const args: string[] = [];
args.push(`X-Nats-Api-Key=${this.apiKey}`);
args.push(`authorization=${this.apiKey}`);

const dopts = Object.assign({
filter: ">",
Expand Down
2 changes: 1 addition & 1 deletion nhgc/nhgc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export class HttpImpl implements Http {
}
const r = Object.assign(opts, { method, body });
const headers = new Headers(opts.headers);
headers.append("X-Nats-Api-Key", this.apiKey);
headers.append("Authorization", this.apiKey);
r.headers = headers;
return fetch(u, r);
}
Expand Down

0 comments on commit 4a52f77

Please sign in to comment.