diff --git a/src/lib/helpers/verifyRequest.ts b/src/lib/helpers/verifyRequest.ts index 2a0ae08..3f60e4f 100644 --- a/src/lib/helpers/verifyRequest.ts +++ b/src/lib/helpers/verifyRequest.ts @@ -22,7 +22,7 @@ export const verifyRequest = ( ); const encryptedData = new TextDecoder().decode( - decipher.decrypt(decodeBase64(stringToCheck)), + decipher.decrypt(decodeBase64(stringToCheck.replace(/-/g, "+").replace(/_/g, "/"))), ); const [parsedTimestamp, parsedVideoId] = encryptedData.split("|"); const parsedTimestampInt = parseInt(parsedTimestamp); diff --git a/src/lib/jobs/potoken.ts b/src/lib/jobs/potoken.ts index 0703f5a..0b1873b 100644 --- a/src/lib/jobs/potoken.ts +++ b/src/lib/jobs/potoken.ts @@ -42,8 +42,7 @@ export const poTokenGenerate = async ( }); const bgConfig: BgConfig = { - fetch: (input: string | URL | globalThis.Request, init?: RequestInit) => - fetch(input, init), + fetch: getFetchClient(konfigStore), globalObj: globalThis, identifier: visitorData, requestKey,