Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-dms3
Commits
9b4b2c68
Commit
9b4b2c68
authored
May 20, 2015
by
Juan Batiz-Benet
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1235 from Luzifer/fix/dnslink-issues
Fix: Using the `dnslink` feature led to infinite redirects
parents
d51f28e8
1b379747
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
core/corehttp/ipns_hostname.go
core/corehttp/ipns_hostname.go
+2
-1
No files found.
core/corehttp/ipns_hostname.go
View file @
9b4b2c68
...
...
@@ -2,6 +2,7 @@ package corehttp
import
(
"net/http"
"path"
"strings"
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/golang.org/x/net/context"
...
...
@@ -20,7 +21,7 @@ func IPNSHostnameOption() ServeOption {
host
:=
strings
.
SplitN
(
r
.
Host
,
":"
,
2
)[
0
]
if
p
,
err
:=
n
.
Namesys
.
Resolve
(
ctx
,
host
);
err
==
nil
{
r
.
URL
.
Path
=
p
.
String
()
+
r
.
URL
.
Path
r
.
URL
.
Path
=
path
.
Join
(
p
.
String
()
,
r
.
URL
.
Path
)
}
childMux
.
ServeHTTP
(
w
,
r
)
})
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment