Add header Host into mirror annotations (#8178)

This commit is contained in:
serge-r 2022-05-08 07:39:17 +07:00 committed by GitHub
parent ec1b01092e
commit 730b7408ca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 62 additions and 2 deletions

View file

@ -1667,10 +1667,11 @@ func buildMirrorLocations(locs []*ingress.Location) string {
mapped.Insert(loc.Mirror.Source)
buffer.WriteString(fmt.Sprintf(`location = %v {
internal;
proxy_set_header Host %v;
proxy_pass %v;
}
`, loc.Mirror.Source, loc.Mirror.Target))
`, loc.Mirror.Source, loc.Mirror.Host, loc.Mirror.Target))
}
return buffer.String()