Skip to content

Commit

Permalink
add proxy protocol always as first listenerFilter
Browse files Browse the repository at this point in the history
  • Loading branch information
zetaab committed May 6, 2024
1 parent 2f916e5 commit 83b0bdf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/xds/translator/proxy_protocol.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ func patchProxyProtocolFilter(xdsListener *listenerv3.Listener, irListener *ir.H
proxyProtocolFilter := buildProxyProtocolFilter()

if proxyProtocolFilter != nil {
xdsListener.ListenerFilters = append(xdsListener.ListenerFilters, proxyProtocolFilter)
// Add the Proxy Protocol filter as first to listeners.
xdsListener.ListenerFilters = append([]*listenerv3.ListenerFilter{proxyProtocolFilter}, xdsListener.ListenerFilters...)
}
}

Expand Down

0 comments on commit 83b0bdf

Please sign in to comment.