🔀 Merge pull request #926 from dkyeremeh/subdomain-favicon

Allow favicons for subdomains
This commit is contained in:
Alicia Sykes 2022-10-30 16:08:21 +00:00 committed by GitHub
commit e8b30b9c25
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -202,7 +202,7 @@ export default {
/* For a given URL, return the hostname only. Used for favicon and generative icons */ /* For a given URL, return the hostname only. Used for favicon and generative icons */
getHostName(url) { getHostName(url) {
try { try {
return new URL(url).hostname.split('.').slice(-2).join('.'); return new URL(url).hostname;
} catch (e) { } catch (e) {
ErrorHandler('Unable to format URL'); ErrorHandler('Unable to format URL');
return url; return url;