Skip to content

Commit

Permalink
Trim Bearer Authentication Strings
Browse files Browse the repository at this point in the history
Addresses Kong#6020
  • Loading branch information
SimplexShotz committed Apr 11, 2024
1 parent df5ae37 commit 1d132b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/insomnia/src/network/bearer-auth/get-header.ts
Expand Up @@ -2,7 +2,7 @@ import type { RequestHeader } from '../../models/request';

export function getBearerAuthHeader(token: string, prefix?: string) {
const name = 'Authorization';
const value = `${prefix || 'Bearer'} ${token}`;
const value = `${prefix?.trim() || 'Bearer'} ${token.trim()}`;
const requestHeader: RequestHeader = {
name,
value,
Expand Down

0 comments on commit 1d132b7

Please sign in to comment.