Ignore all ports by default in Site Preferences

This commit is contained in:
varjolintu 2024-05-27 19:54:38 +03:00
parent d433d8ac3d
commit ea46fd747d

View file

@ -87,8 +87,8 @@ const siteMatch = function(site, url) {
const siteUrl = new URL(site);
const currentUrl = new URL(url);
// Match scheme and port
if (siteUrl.protocol !== currentUrl.protocol || siteUrl.port !== currentUrl.port) {
// Match scheme and port. If Site Preferences does not use a port, all ports are ignored.
if (siteUrl.protocol !== currentUrl.protocol || (siteUrl.port && siteUrl.port !== currentUrl.port)) {
return false;
}