[Plugins] [CopyAsCURL] [Auth] [JWT] Include custom bearer prefix to copy CURL (#253)

Co-authored-by: Gregory Schier <gschier1990@gmail.com>
This commit is contained in:
moshyfawnandGregory Schier authored and GitHub committed 2025-09-16 11:20:23 -07:00
1 parent 28c6af8f94
commit 907e09a417
2 files changed
+39 -10

No files matched your search

+3 -1
View File
@@ -93,7 +93,9 @@ export async function convertToCurl(request: Partial<HttpRequest>) {
// Add bearer authentication
if (request.authenticationType === 'bearer') {
xs.push('--header', quote(`Authorization: Bearer ${request.authentication?.token ?? ''}`));
const value =
`${request.authentication?.prefix ?? 'Bearer'} ${request.authentication?.token ?? ''}`.trim();
xs.push('--header', quote(`Authorization: ${value}`));
xs.push(NEWLINE);
}