mirror of
https://github.com/itzg/mc-router.git
synced 2024-11-21 11:25:41 +01:00
Merge pull request #5 from JLSchuler99/Host-not-case-sensitive
Make server address not case sensitive
This commit is contained in:
commit
e2cd062265
@ -131,6 +131,8 @@ func (r *routesImpl) FindBackendForServerAddress(serverAddress string) string {
|
|||||||
|
|
||||||
addressParts := strings.Split(serverAddress, "\x00")
|
addressParts := strings.Split(serverAddress, "\x00")
|
||||||
|
|
||||||
|
address := strings.toLower(addressParts[0])
|
||||||
|
|
||||||
if r.mappings == nil {
|
if r.mappings == nil {
|
||||||
return r.defaultRoute
|
return r.defaultRoute
|
||||||
} else {
|
} else {
|
||||||
@ -171,6 +173,8 @@ func (r *routesImpl) CreateMapping(serverAddress string, backend string) {
|
|||||||
r.Lock()
|
r.Lock()
|
||||||
defer r.Unlock()
|
defer r.Unlock()
|
||||||
|
|
||||||
|
serverAddress = strings.toLower(serverAddress)
|
||||||
|
|
||||||
logrus.WithFields(logrus.Fields{
|
logrus.WithFields(logrus.Fields{
|
||||||
"serverAddress": serverAddress,
|
"serverAddress": serverAddress,
|
||||||
"backend": backend,
|
"backend": backend,
|
||||||
|
Loading…
Reference in New Issue
Block a user