updated 'config.ini'

This commit is contained in:
partisan 2024-11-26 07:46:03 +01:00
parent 28f71271d7
commit be4f86580e
13 changed files with 635 additions and 208 deletions

View file

@ -65,6 +65,7 @@ func renderTemplate(w http.ResponseWriter, tmplName string, data map[string]inte
}
}
// Randoms string generator used for auth code
func generateStrongRandomString(length int) string {
bytes := make([]byte, length)
_, err := rand.Read(bytes)
@ -84,7 +85,7 @@ func isLocalAddress(domain string) bool {
return domain == "localhost" || strings.HasPrefix(domain, "127.") || strings.HasPrefix(domain, "192.168.") || strings.HasPrefix(domain, "10.")
}
// Ensures that HTTP or HTTPS is befor the adress if needed
// Ensures that HTTP or HTTPS is before the address if needed
func addProtocol(domain string) string {
if hasProtocol(domain) {
return domain