fix: exclude localhost
This commit is contained in:
parent
5520c6ff3d
commit
cd75d65271
1 changed files with 2 additions and 1 deletions
|
@ -41,7 +41,8 @@ export async function uploadFromUrl({
|
|||
const parsedUrl = new URL(url);
|
||||
if (
|
||||
process.env.NODE_ENV === "production" &&
|
||||
PRIVATE_IP.test(parsedUrl.hostname)
|
||||
(PRIVATE_IP.test(parsedUrl.hostname) ||
|
||||
parsedUrl.hostname.includes("localhost"))
|
||||
) {
|
||||
throw new Error("Private IP is not allowed");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue