Add header Host into mirror annotations (#8178)
This commit is contained in:
parent
ec1b01092e
commit
730b7408ca
4 changed files with 62 additions and 2 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue