Do not render invalid request mirroring config
Signed-off-by: Gerald Pape <gerald@giantswarm.io>
This commit is contained in:
parent
41f6f8c9c1
commit
165a41102f
1 changed files with 3 additions and 3 deletions
|
@ -1727,7 +1727,7 @@ func buildMirrorLocations(locs []*ingress.Location) string {
|
|||
mapped := sets.Set[string]{}
|
||||
|
||||
for _, loc := range locs {
|
||||
if loc.Mirror.Source == "" || loc.Mirror.Target == "" {
|
||||
if loc.Mirror.Source == "" || loc.Mirror.Target == "" || loc.Mirror.Host == "" {
|
||||
continue
|
||||
}
|
||||
|
||||
|
@ -1738,8 +1738,8 @@ 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;
|
||||
proxy_set_header Host "%v";
|
||||
proxy_pass "%v";
|
||||
}
|
||||
|
||||
`, loc.Mirror.Source, loc.Mirror.Host, loc.Mirror.Target))
|
||||
|
|
Loading…
Reference in a new issue