diff --git a/src/endpoints/content-manager.js b/src/endpoints/content-manager.js index 7102637f5..99f9c4997 100644 --- a/src/endpoints/content-manager.js +++ b/src/endpoints/content-manager.js @@ -710,8 +710,7 @@ router.post('/importURL', async (request, response) => { type = 'character'; result = await downloadGenericPng(url); } else { - const receivedURL = new URL(url); - console.error(`Received an import for "${receivedURL.host}", but site is not whitelisted. This domain must be added to the config key "whitelistImportDomains" to allow import from this source.`); + console.error(`Received an import for "${getHostFromUrl(url)}", but site is not whitelisted. This domain must be added to the config key "whitelistImportDomains" to allow import from this source.`); return response.sendStatus(404); }