Skip to content

Apply configuration of SnippetsFilters to NGINX #2604

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prev Previous commit
Next Next commit
Remove unnecessary len check
  • Loading branch information
Kate Osborn committed Sep 25, 2024
commit 8b716e4cd5a1df288643fe6eab7d4eff4ffda9d1
8 changes: 3 additions & 5 deletions internal/mode/static/nginx/config/includes.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,9 @@ func createIncludesFromServerSnippetsFilters(server dataplane.VirtualServer) []s

for _, pr := range server.PathRules {
for _, mr := range pr.MatchRules {
if len(mr.Filters.SnippetsFilters) > 0 {
for _, sf := range mr.Filters.SnippetsFilters {
if sf.ServerSnippet != nil {
includes = append(includes, createIncludeFromSnippet(*sf.ServerSnippet))
}
for _, sf := range mr.Filters.SnippetsFilters {
if sf.ServerSnippet != nil {
includes = append(includes, createIncludeFromSnippet(*sf.ServerSnippet))
}
}
}
Expand Down