Use getHostFromUrl for error log

afe29c61cc8597d263bf1e90494731ca27fafa6f

Cohee <18619528+Cohee1207@users.noreply.github.com>

1 files changed, +1 -2Ignore whitespace
src/endpoints/content-manager.js+1 -2
@@ -710,8 +710,7 @@ router.post('/importURL', async (request, response) => {
710 type = 'character';710 type = 'character';
711 result = await downloadGenericPng(url);711 result = await downloadGenericPng(url);
712 } else {712 } else {
713 const receivedURL = new URL(url);713 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.`);
714 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.`);
715 return response.sendStatus(404);714 return response.sendStatus(404);
716 }715 }
717716