From 74a87525702cffa0da01f2a4a3e280d9e4290fbd Mon Sep 17 00:00:00 2001 From: fatedier Date: Fri, 29 Mar 2019 17:12:44 +0800 Subject: [PATCH] fix route conflict --- server/proxy/http.go | 4 ++++ server/proxy/https.go | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/server/proxy/http.go b/server/proxy/http.go index b76fe67f..1dde20ec 100644 --- a/server/proxy/http.go +++ b/server/proxy/http.go @@ -51,6 +51,10 @@ func (pxy *HttpProxy) Run() (remoteAddr string, err error) { addrs := make([]string, 0) for _, domain := range pxy.cfg.CustomDomains { + if domain == "" { + continue + } + routeConfig.Domain = domain for _, location := range locations { routeConfig.Location = location diff --git a/server/proxy/https.go b/server/proxy/https.go index a35af231..888fcbe5 100644 --- a/server/proxy/https.go +++ b/server/proxy/https.go @@ -33,6 +33,10 @@ func (pxy *HttpsProxy) Run() (remoteAddr string, err error) { addrs := make([]string, 0) for _, domain := range pxy.cfg.CustomDomains { + if domain == "" { + continue + } + routeConfig.Domain = domain l, errRet := pxy.rc.VhostHttpsMuxer.Listen(routeConfig) if errRet != nil {