fix redirect with wrong target port
This commit is contained in:
parent
00b3d0bc70
commit
066e6b90e6
@ -210,7 +210,11 @@ func (h *redirectHandler) handleHTTPS(ctx context.Context, rw io.ReadWriter, rad
|
|||||||
if host == "" {
|
if host == "" {
|
||||||
host = dstAddr.String()
|
host = dstAddr.String()
|
||||||
} else {
|
} else {
|
||||||
host = net.JoinHostPort(host, "443")
|
_, port, _ := net.SplitHostPort(dstAddr.String())
|
||||||
|
if port == "" {
|
||||||
|
port = "443"
|
||||||
|
}
|
||||||
|
host = net.JoinHostPort(host, port)
|
||||||
}
|
}
|
||||||
|
|
||||||
log = log.WithFields(map[string]any{
|
log = log.WithFields(map[string]any{
|
||||||
|
Loading…
Reference in New Issue
Block a user