mirror of
https://github.com/juanfont/headscale.git
synced 2025-11-29 13:28:03 -05:00
Fix some issues in testing with new hostname handling
This commit is contained in:
2
utils.go
2
utils.go
@@ -320,7 +320,7 @@ func GenerateRandomStringURLSafe(n int) (string, error) {
|
||||
func GenerateRandomStringDNSSafe(n int) (string, error) {
|
||||
str, err := GenerateRandomStringURLSafe(n)
|
||||
|
||||
str = strings.ReplaceAll(str, "_", "-")
|
||||
str = strings.ToLower(strings.ReplaceAll(strings.ReplaceAll(str, "_", ""), "-", ""))
|
||||
|
||||
return str[:n], err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user