diff options
-rw-r--r-- | cn-http.service | 2 | ||||
-rw-r--r-- | cnhttp.go | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/cn-http.service b/cn-http.service index debeeb5..f7688bc 100644 --- a/cn-http.service +++ b/cn-http.service @@ -1,5 +1,5 @@ [Unit] -Description=CNP-HTTP and CNM-HTML translating reverse proxy +Description=CNP-HTTP and CNM-HTML translating gateway After=network.target [Service] @@ -573,7 +573,7 @@ func (srv *server) linkToURL(req *cnp.Request, link string) (urlStr, extern stri host = req.Host() } if u, err := url.Parse(link); err == nil { - if u.Scheme == "cnp" { + if u.Scheme == "cnp" && (srv.host == "" || u.Host == srv.host) { var lhost, lpath string lhost = u.Host lpath = u.Path |