Use getHostFromUrl for error log

This commit is contained in:
Cohee
2025-04-19 22:43:16 +03:00
parent 1a1464800f
commit afe29c61cc

View File

@@ -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);
}