Skip to content
Snippets Groups Projects
Commit 2d74b782 authored by Jano Hendriks's avatar Jano Hendriks
Browse files

Fix type

parent 5f39e022
No related branches found
No related tags found
No related merge requests found
...@@ -165,7 +165,7 @@ func ValidateIPAddress(ipAddress string) (cleanedIPAddress string, err error) { ...@@ -165,7 +165,7 @@ func ValidateIPAddress(ipAddress string) (cleanedIPAddress string, err error) {
return ipAddress, nil return ipAddress, nil
} }
func GetRequestSourceIP(proxyRequest *events.APIGatewayProxyRequest, websocketReqeuest *events.APIGatewayWebsocketProxyRequest) string { func GetRequestSourceIP(proxyRequest *events.APIGatewayProxyRequest, websocketRequest *events.APIGatewayWebsocketProxyRequest) string {
var requestSourceIP string var requestSourceIP string
if proxyRequest != nil { if proxyRequest != nil {
requestSourceIP = proxyRequest.RequestContext.Identity.SourceIP requestSourceIP = proxyRequest.RequestContext.Identity.SourceIP
...@@ -181,8 +181,8 @@ func GetRequestSourceIP(proxyRequest *events.APIGatewayProxyRequest, websocketRe ...@@ -181,8 +181,8 @@ func GetRequestSourceIP(proxyRequest *events.APIGatewayProxyRequest, websocketRe
return headerSourceIP return headerSourceIP
} }
} }
} else if websocketReqeuest != nil { } else if websocketRequest != nil {
requestSourceIP = websocketReqeuest.RequestContext.Identity.SourceIP requestSourceIP = websocketRequest.RequestContext.Identity.SourceIP
} }
return requestSourceIP return requestSourceIP
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment