fix: getAPIEndpoints() should return public_url (#12852)

fixes #12850
This commit is contained in:
Harshavardhana
2021-08-02 21:50:20 -07:00
committed by GitHub
parent ea64a9263c
commit 9371852c7d
3 changed files with 16 additions and 8 deletions

View File

@@ -2316,12 +2316,13 @@ func createHostAnonymizerForFSMode() map[string]string {
apiEndpoints := getAPIEndpoints()
for _, ep := range apiEndpoints {
if len(ep) > 0 {
if url, err := xnet.ParseHTTPURL(ep); err == nil {
// In FS mode the drive names don't include the host.
// So mapping just the host should be sufficient.
hostAnonymizer[url.Host] = "server1"
}
if len(ep) == 0 {
continue
}
if url, err := xnet.ParseHTTPURL(ep); err == nil {
// In FS mode the drive names don't include the host.
// So mapping just the host should be sufficient.
hostAnonymizer[url.Host] = "server1"
}
}
return hostAnonymizer