fix: remove brackets
This commit is contained in:
parent
ad93bc80f8
commit
dc2fde0a75
1 changed files with 1 additions and 1 deletions
|
@ -38,7 +38,7 @@ export async function uploadFromUrl({
|
|||
const parsedUrl = new URL(url);
|
||||
if (
|
||||
process.env.NODE_ENV === "production" &&
|
||||
isPrivateIp(parsedUrl.hostname)
|
||||
isPrivateIp(parsedUrl.hostname.replaceAll(/(\[)|(\])/g, ""))
|
||||
) {
|
||||
throw new Error("Private IP is not allowed");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue