fix: 🐛 cannot retry oidc authentication in desktop & admin (#2512)

* fix: 🐛 cannot retry oidc authentication in desktop & admin

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-15250
This commit is contained in:
Lisbet Alvarez authored and GitHub committed 2024-10-08 10:29:21 -07:00
1 parent 64e568bd72
commit e807e1a3af
6 files changed
+18 -9

No files matched your search

@@ -0,0 +1,11 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: BUSL-1.1
*/
const isLocalhost = (url) => {
const localhostRegex = /^http:\/\/(localhost|127\.0\.0\.1):\d{1,5}(?:\/|$)/i;
return localhostRegex.test(url);
};
module.exports = isLocalhost;