encode uri component for authorization header

This commit is contained in:
Kendall Garner 2024-02-07 20:29:29 -08:00
parent 73c6ddd116
commit 49cbef729b
No known key found for this signature in database
GPG Key ID: 18D2767419676C87

View File

@ -102,9 +102,9 @@ const authenticate = async (
Username: body.username,
},
headers: {
'x-emby-authorization': `MediaBrowser Client="Feishin", Device="${getHostname()}", DeviceId="Feishin-${getHostname()}-${
body.username
}", Version="${packageJson.version}"`,
'x-emby-authorization': `MediaBrowser Client="Feishin", Device="${getHostname()}", DeviceId="Feishin-${getHostname()}-${encodeURIComponent(
body.username,
)}", Version="${packageJson.version}"`,
},
});