Skip to content

Commit

Permalink
Fix typo in fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nakedmcse committed Mar 30, 2024
1 parent cdedbbe commit dd5e087
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/services/FileUrlService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { Logger } from "@tsed/logger";
import { Readable } from "node:stream";
import { finished } from "node:stream/promises";
import { ReadableStream } from "node:stream/web";
import isLocalhost from "is-localhost-ip";

const require = Module.createRequire(import.meta.url);

Expand Down Expand Up @@ -113,7 +114,7 @@ export class FileUrlService {

private isLocalhost(url: string): Promise<boolean> {
return url.includes("://")
? punycode.toASCII(url).split("://")[1].split("/")[0]
: punycode.toASCII(url).split("/")[0];
? isLocalhost(punycode.toASCII(url).split("://")[1].split("/")[0])
: isLocalhost(punycode.toASCII(url).split("/")[0]);
}
}

0 comments on commit dd5e087

Please sign in to comment.