api/PostPolicy: Allow location header fully qualified URL (#4926)

req.Host is used to construct the final object location.

Fixes #4910
This commit is contained in:
Harshavardhana
2017-09-24 16:43:21 -07:00
committed by Dee Koder
parent c3ff402fcb
commit 4cadb33da2
5 changed files with 99 additions and 17 deletions

View File

@@ -175,13 +175,8 @@ func getAPIEndpoints(serverAddr string) (apiEndpoints []string) {
ipList = []string{host}
}
scheme := httpScheme
if globalIsSSL {
scheme = httpsScheme
}
for _, ip := range ipList {
apiEndpoints = append(apiEndpoints, fmt.Sprintf("%s://%s:%s", scheme, ip, port))
apiEndpoints = append(apiEndpoints, fmt.Sprintf("%s://%s:%s", getURLScheme(globalIsSSL), ip, port))
}
return apiEndpoints