mirror of
https://github.com/caddyserver/caddy.git
synced 2025-05-24 02:02:26 -04:00
caddytls: Set local_ip, not remote_ip (#6952)
Follow-up on 35c8c2d92d26208642cea0d1549c77a00124e154 where I was a dum-dum
This commit is contained in:
parent
737936c06b
commit
105eee671c
@ -144,9 +144,9 @@ func (hcg HTTPCertGetter) GetCertificate(ctx context.Context, hello *tls.ClientH
|
|||||||
qs.Set("server_name", hello.ServerName)
|
qs.Set("server_name", hello.ServerName)
|
||||||
qs.Set("signature_schemes", strings.Join(sigs, ","))
|
qs.Set("signature_schemes", strings.Join(sigs, ","))
|
||||||
qs.Set("cipher_suites", strings.Join(suites, ","))
|
qs.Set("cipher_suites", strings.Join(suites, ","))
|
||||||
remoteIP, _, err := net.SplitHostPort(hello.Conn.RemoteAddr().String())
|
localIP, _, err := net.SplitHostPort(hello.Conn.LocalAddr().String())
|
||||||
if err == nil && remoteIP != "" {
|
if err == nil && localIP != "" {
|
||||||
qs.Set("remote_ip", remoteIP)
|
qs.Set("local_ip", localIP)
|
||||||
}
|
}
|
||||||
parsed.RawQuery = qs.Encode()
|
parsed.RawQuery = qs.Encode()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user