@@ -26,13 +26,13 @@ func handler(request events.ClientVPNConnectionHandlerRequest) (events.ClientVPN
26
26
27
27
sourceIP := request.PublicIP
28
28
if net.ParseIP (sourceIP) == nil {
29
- return events.ClientVPNConnectionHandlerResponse {}, fmt.Errorf (" Invalid parameter PublicIP passed in request: ' %s ' " , sourceIP)
29
+ return events.ClientVPNConnectionHandlerResponse {}, fmt.Errorf (" Invalid parameter PublicIP passed in request: %q " , sourceIP)
30
30
}
31
31
32
- log.Printf (" SOURCE IP: %s " , sourceIP)
32
+ log.Printf (" SOURCE IP: %q " , sourceIP)
33
33
34
34
if allowed , ok := AllowedIPs[sourceIP]; ok && allowed {
35
- log.Printf (" Allowing access from: %s " , sourceIP)
35
+ log.Printf (" Allowing access from: %q " , sourceIP)
36
36
return events.ClientVPNConnectionHandlerResponse {
37
37
Allow: true ,
38
38
ErrorMsgOnFailedPostureCompliance: " " ,
@@ -41,10 +41,10 @@ func handler(request events.ClientVPNConnectionHandlerRequest) (events.ClientVPN
41
41
}, nil
42
42
}
43
43
44
- log.Printf (" Blocking access from: %s " , sourceIP)
44
+ log.Printf (" Blocking access from: %q " , sourceIP)
45
45
return events.ClientVPNConnectionHandlerResponse {
46
46
Allow: false ,
47
- ErrorMsgOnFailedPostureCompliance: " You're accessing from a blocked IP range ." ,
47
+ ErrorMsgOnFailedPostureCompliance: " You're trying to connect from an IP address that is not allowed ." ,
48
48
PostureComplianceStatuses: []string {" BlockedSourceIP" },
49
49
SchemaVersion: " v1" ,
50
50
}, nil
0 commit comments