fix: passkey can't be added if PUBLIC_APP_URL includes a port

This commit is contained in:
Elias Schneider
2024-12-31 10:42:54 +01:00
parent 2d0bd8dcbf
commit 0729ce9e1a
3 changed files with 5 additions and 6 deletions

View File

@@ -29,12 +29,12 @@ func GenerateRandomAlphanumericString(length int) (string, error) {
return string(result), nil
}
func GetHostFromURL(rawURL string) string {
func GetHostnameFromURL(rawURL string) string {
parsedURL, err := url.Parse(rawURL)
if err != nil {
return ""
}
return parsedURL.Host
return parsedURL.Hostname()
}
// StringPointer creates a string pointer from a string value