fix: remove brackets

This commit is contained in:
Namekuji 2023-08-18 06:22:51 -04:00
parent ad93bc80f8
commit dc2fde0a75
No known key found for this signature in database
GPG Key ID: 1D62332C07FBA532

View File

@ -38,7 +38,7 @@ export async function uploadFromUrl({
const parsedUrl = new URL(url); const parsedUrl = new URL(url);
if ( if (
process.env.NODE_ENV === "production" && process.env.NODE_ENV === "production" &&
isPrivateIp(parsedUrl.hostname) isPrivateIp(parsedUrl.hostname.replaceAll(/(\[)|(\])/g, ""))
) { ) {
throw new Error("Private IP is not allowed"); throw new Error("Private IP is not allowed");
} }