Skip to content

Commit

Permalink
Fix header url encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
zachwn committed Sep 26, 2023
1 parent 92795b2 commit bcb0642
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/utils/authentication.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import type { ClientInfo, DeviceInfo } from '../models';
*/
export function getAuthorizationHeader(clientInfo: ClientInfo, deviceInfo: DeviceInfo, accessToken = ''): string {
return [
`MediaBrowser Client="${encodeURI(clientInfo.name)}"`,
`Device="${encodeURI(deviceInfo.name)}"`,
`DeviceId="${encodeURI(deviceInfo.id)}"`,
`Version="${encodeURI(clientInfo.version)}"`,
`Token="${encodeURI(accessToken)}"`
`MediaBrowser Client="${encodeURIComponent(clientInfo.name)}"`,
`Device="${encodeURIComponent(deviceInfo.name)}"`,
`DeviceId="${encodeURIComponent(deviceInfo.id)}"`,
`Version="${encodeURIComponent(clientInfo.version)}"`,
`Token="${encodeURIComponent(accessToken)}"`
].join(', ');
}

0 comments on commit bcb0642

Please sign in to comment.