private GetClientIp ( |
||
request | ||
리턴 |
protected virtual RequestIdentity SetIdentity(HttpRequestMessage request) { return(new RequestIdentity { ClientIp = core.GetClientIp(request).ToString(), Endpoint = request.RequestUri.AbsolutePath.ToLowerInvariant(), ClientKey = request.Headers.Contains("Authorization-Token") ? request.Headers.GetValues("Authorization-Token").First() : "anon", Method = request.Method }); }
protected virtual RequestIdentity SetIndentity(HttpRequestMessage request) { var entry = new RequestIdentity(); entry.ClientIp = core.GetClientIp(request).ToString(); entry.Endpoint = request.RequestUri.AbsolutePath.ToLowerInvariant(); entry.ClientKey = request.Headers.Contains("Authorization-Token") ? request.Headers.GetValues("Authorization-Token").First() : "anon"; return(entry); }
protected virtual RequestIdentity SetIdentity(HttpRequestBase request) { string cookieCav = null; if (request.Cookies.Count > 0 && request.Cookies["COOKIECAV"] != null) { HttpCookie cookie = request.Cookies["COOKIECAV"]; cookieCav = cookie.Value; } return(new RequestIdentity { ClientIp = core.GetClientIp(request).ToString(), Endpoint = request.Url.AbsolutePath, ClientKey = cookieCav ?? "anon" }); }
protected IPAddress GetClientIp(HttpRequestMessage request) { return(core.GetClientIp(request)); }