From dd5e087b47d8485f7e007524315b135337a7ba5b Mon Sep 17 00:00:00 2001 From: Walker Aldridge Date: Sat, 30 Mar 2024 12:41:52 -0500 Subject: [PATCH] Fix typo in fix --- src/services/FileUrlService.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/services/FileUrlService.ts b/src/services/FileUrlService.ts index 7dc83b3..e5d8e45 100644 --- a/src/services/FileUrlService.ts +++ b/src/services/FileUrlService.ts @@ -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); @@ -113,7 +114,7 @@ export class FileUrlService { private isLocalhost(url: string): Promise { 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]); } }