1
0
Fork 0
mirror of https://github.com/Luzifer/nginx-sso.git synced 2025-04-17 12:41:51 +00:00

Fix: Host already had the port attached

This happened when providing a port number in the URI as the `Host`
field still has the port number while the `Hostname()` method only
returns the hostname without the port.

fixes 

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2019-01-17 23:47:21 +01:00
parent 085a158371
commit 3cd5ab380a
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E

View file

@ -262,7 +262,7 @@ func (a authLDAP) dial() (*ldap.Conn, error) {
return nil, err
}
host := u.Host
host := u.Hostname()
port := u.Port()
var l *ldap.Conn