Fix(httpupgrade): X-Forwarded-For header not read. (#3172)

This commit is contained in:
チセ 2024-03-24 01:34:51 +08:00 committed by GitHub
parent 70a5fe9a25
commit 2cafb3ef89
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 34 additions and 0 deletions

View file

@ -0,0 +1,19 @@
package httpupgrade
import "net"
type connnection struct {
net.Conn
remoteAddr net.Addr
}
func newConnection(conn net.Conn, remoteAddr net.Addr) *connnection {
return &connnection{
Conn: conn,
remoteAddr: remoteAddr,
}
}
func (c *connnection) RemoteAddr() net.Addr {
return c.remoteAddr
}