mirror of
https://github.com/bolkedebruin/rdpgw.git
synced 2026-03-28 06:56:34 +00:00
Add comments and make client ip address verification optional but enabled by default
This commit is contained in:
@@ -24,6 +24,7 @@ var (
|
||||
)
|
||||
|
||||
var ExpiryTime time.Duration = 5
|
||||
var VerifyClientIP bool = true
|
||||
|
||||
type customClaims struct {
|
||||
RemoteServer string `json:"remoteServer"`
|
||||
@@ -89,11 +90,11 @@ func VerifyServerFunc(ctx context.Context, host string) (bool, error) {
|
||||
return false, nil
|
||||
}
|
||||
|
||||
/*if s.ClientIp != common.GetClientIp(ctx) {
|
||||
if VerifyClientIP && s.ClientIp != common.GetClientIp(ctx) {
|
||||
log.Printf("Current client ip address %s does not match token client ip %s",
|
||||
common.GetClientIp(ctx), s.ClientIp)
|
||||
return false, nil
|
||||
}*/
|
||||
}
|
||||
|
||||
return true, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user