summaryrefslogtreecommitdiffstats
path: root/cnhttp.go
diff options
context:
space:
mode:
Diffstat (limited to 'cnhttp.go')
-rw-r--r--cnhttp.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/cnhttp.go b/cnhttp.go
index 42f723d..ab251af 100644
--- a/cnhttp.go
+++ b/cnhttp.go
@@ -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