From d446af5c25f29aa4a9bb2f6dd556990553979794 Mon Sep 17 00:00:00 2001 From: Jacob Schuler Date: Tue, 25 Jun 2019 14:31:49 -0400 Subject: [PATCH] Store all addresses in lowercase --- server/routes.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/routes.go b/server/routes.go index 1e7a464..2f0805b 100644 --- a/server/routes.go +++ b/server/routes.go @@ -131,6 +131,8 @@ func (r *routesImpl) FindBackendForServerAddress(serverAddress string) string { addressParts := strings.Split(serverAddress, "\x00") + address := strings.toLower(addressParts[0]) + if r.mappings == nil { return r.defaultRoute } else { @@ -171,6 +173,8 @@ func (r *routesImpl) CreateMapping(serverAddress string, backend string) { r.Lock() defer r.Unlock() + serverAddress = strings.toLower(serverAddress) + logrus.WithFields(logrus.Fields{ "serverAddress": serverAddress, "backend": backend,