Remove ai comment

This commit is contained in:
风扇滑翔翼
2026-07-12 03:49:20 +08:00
committed by GitHub
parent d5dcc4d6fe
commit 1e9962116f
-8
View File
@@ -373,14 +373,6 @@ func (h *requestHandler) ServeHTTP(writer http.ResponseWriter, request *http.Req
Reader: request.Body,
ResponseWriter: writer,
}
// Use the concrete local address this request actually arrived on,
// not the listener's wildcard address (e.g. "[::]" / "0.0.0.0"). Go's
// net/http stores the per-connection local address in the request
// context under LocalAddrContextKey. Without this, sendThrough "origin"
// (which derives the outbound gateway from inbound.Local) reads the
// wildcard and pins every connection's egress to a single address,
// breaking source-in-source-out on multi-IP hosts. Fall back to the
// listener address when the key is absent (e.g. HTTP/3).
localAddr := h.localAddr
if la, ok := request.Context().Value(http.LocalAddrContextKey).(net.Addr); ok && la != nil {
localAddr = la