From 1da5fbfe579ecad22d52cdc99f336bc55528c41c Mon Sep 17 00:00:00 2001 From: Skye J Date: Fri, 7 Jun 2024 22:03:53 -0400 Subject: [PATCH] ios17 komga download fix After doing some testing for some reason the authorization section of the header never gets set if you just set the 'authorizaton' part of the headers. Resesting 'headers' to a new Record seems to resolve this. --- src/Paperback/Paperback.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Paperback/Paperback.ts b/src/Paperback/Paperback.ts index 01bb241..7f50f7e 100644 --- a/src/Paperback/Paperback.ts +++ b/src/Paperback/Paperback.ts @@ -104,7 +104,9 @@ export class KomgaRequestInterceptor implements SourceInterceptor { // raising an error in getAuthorizationString when we check for its existence // Thus we only inject an authorizationString if none are defined in the request if (request.headers.authorization === undefined) { - request.headers.authorization = await getAuthorizationString(this.stateManager) + request.headers = { + 'authorization': await getAuthorizationString(this.stateManager) + } } return request }