Skip to content

Commit

Permalink
fix: make https first over http
Browse files Browse the repository at this point in the history
  • Loading branch information
Deivu committed Dec 22, 2024
1 parent df0ee98 commit adb8de2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,10 +227,10 @@ export function Fetch(url: string, options: RequestOptions): Promise<FetchRespon
return new Promise((resolve, reject) => {
let client;

if (url.startsWith('http')) {
client = Http.request;
} else if (url.startsWith('https')) {
if (url.startsWith('https')) {
client = Https.request;
} else if (url.startsWith('http')) {
client = Http.request;
} else {
throw new Error('Unknown url protocol');
}
Expand Down

0 comments on commit adb8de2

Please sign in to comment.