only forward auth to trusted locations

Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
Merge pull request #6220 from vieux/fix_redirect

Only forward auth to trusted locations