Skip to content

Commit

Permalink
fix unauthorized requests
Browse files Browse the repository at this point in the history
  • Loading branch information
JustJoostNL committed Aug 24, 2024
1 parent d125a13 commit 85f2b47
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/utils/fetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import fetch from "cross-fetch";
export function extendFetch(
fetchFn: typeof fetch,
timeout?: number,
rejectUnauthorized?: boolean,
allowUnauthorized?: boolean,
): (url: string, options: RequestInit) => Promise<Response> {
const agent = rejectUnauthorized
? new Agent({ rejectUnauthorized })
const agent = allowUnauthorized
? new Agent({ rejectUnauthorized: false })
: undefined;

return async (url: string, options: RequestInit) => {
Expand Down

0 comments on commit 85f2b47

Please sign in to comment.