提交 8df8737f 作者: Knut Ahlers

removed requirement of path package

上级 373260d3
......@@ -2,7 +2,6 @@ package corehttp
import (
"net/http"
"path"
"strings"
isd "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-is-domain"
......@@ -24,7 +23,7 @@ func IPNSHostnameOption() ServeOption {
if len(host) > 0 && isd.IsDomain(host) {
name := "/ipns/" + host
if _, err := n.Namesys.Resolve(ctx, name); err == nil {
r.URL.Path = path.Join("/ipns/", host) + r.URL.Path
r.URL.Path = name + r.URL.Path
}
}
childMux.ServeHTTP(w, r)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论