Signed-off-by: oppiliappan me@oppi.li
+14
-1
Diff
round #1
+14
-1
knotmirror/xrpc/proxy.go
+14
-1
knotmirror/xrpc/proxy.go
···
54
54
}
55
55
}()
56
56
}
57
-
return &knotInfo{baseURL: repo.KnotDomain, didSlashRepo: repo.DidSlashRepo()}, nil
57
+
knotURL := repo.KnotDomain
58
+
if !strings.Contains(repo.KnotDomain, "://") {
59
+
if host, _ := db.GetHost(ctx, x.db, repo.KnotDomain); host != nil {
60
+
knotURL = host.URL()
61
+
} else {
62
+
x.logger.Warn("repo is from unknown knot")
63
+
if x.cfg.KnotUseSSL {
64
+
knotURL = "https://" + knotURL
65
+
} else {
66
+
knotURL = "http://" + knotURL
67
+
}
68
+
}
69
+
}
70
+
return &knotInfo{baseURL: knotURL, didSlashRepo: repo.DidSlashRepo()}, nil
58
71
}
59
72
60
73
owner, err := x.resolver.ResolveIdent(ctx, repoAt.Authority().String())
History
2 rounds
0 comments
boltless.me
submitted
#1
1 commit
expand
collapse
knotmirror: add scheme to proxy hosts
Signed-off-by: oppiliappan <me@oppi.li>
merge conflicts detected
expand
collapse
expand
collapse
- knotmirror/xrpc/proxy.go:54
expand 0 comments
boltless.me
submitted
#0
1 commit
expand
collapse
knotmirror: add scheme to proxy hosts
Signed-off-by: oppiliappan <me@oppi.li>