Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
salonichf5 committed Sep 4, 2024
1 parent 9bb494d commit 38d115a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions internal/mode/static/nginx/config/servers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2723,6 +2723,11 @@ func TestGenerateProxySetHeaders(t *testing.T) {
},
},
},
{
msg: "no filter set",
expectedHeaders: httpBaseHeaders,
GRPC: false,
},
}

for _, tc := range tests {
Expand Down
5 changes: 3 additions & 2 deletions internal/mode/static/state/dataplane/configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -863,8 +863,9 @@ func buildBaseHTTPConfig(g *graph.Graph) BaseHTTPConfig {
}

if len(g.NginxProxy.Source.Spec.RewriteClientIP.TrustedAddresses) > 0 {
trustedAddresses := convertTrustedAddresses(g.NginxProxy.Source.Spec.RewriteClientIP.TrustedAddresses)
baseConfig.RewriteClientIPSettings.TrustedAddresses = trustedAddresses
baseConfig.RewriteClientIPSettings.TrustedAddresses = convertTrustedAddresses(
g.NginxProxy.Source.Spec.RewriteClientIP.TrustedAddresses,
)
}

if g.NginxProxy.Source.Spec.RewriteClientIP.SetIPRecursively != nil {
Expand Down

0 comments on commit 38d115a

Please sign in to comment.