case insensitivity

This commit is contained in:
2025-06-19 16:08:18 -04:00
parent e744afbe26
commit 9f33e1aeb6
3 changed files with 71 additions and 4 deletions

View File

@@ -90,11 +90,14 @@
e.preventDefault();
const tenantId = document.getElementById('tenantId').value;
if (tenantId) {
if (reservedIds.includes(tenantId.toLowerCase())) {
// Convert to lowercase for consistency
const normalizedId = tenantId.toLowerCase();
if (reservedIds.includes(normalizedId)) {
alert(`"${tenantId}" is a reserved name and cannot be used as a tenant ID.`);
return;
}
window.location.href = '/' + tenantId + '/';
// Use the normalized (lowercase) ID in the URL
window.location.href = '/' + normalizedId + '/';
}
});