improve trusted location detection
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
This commit is contained in:
@@ -766,7 +766,7 @@ func trustedLocation(req *http.Request) bool {
|
||||
}
|
||||
|
||||
for _, trusted := range trusteds {
|
||||
if strings.HasSuffix(hostname, trusted) {
|
||||
if hostname == trusted || strings.HasSuffix(hostname, "."+trusted) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user