public void OnActionExecuting(ActionExecutingContext filterContext)
        {
            var request = _requestContextProvider.Get();

            _loggingContext.Set("requestUrl", request.RawUrl);
            _loggingContext.Set("clientIP", GetClientIP(request));
            _loggingContext.Set("requestContent", _requestContentProvider.Get());
        }
Ejemplo n.º 2
0
        public string Get()
        {
            var content = _contextProvider.Get <string>(Key);

            if (!string.IsNullOrEmpty(content))
            {
                return(content);
            }

            var request = _requestContextProvider.Get();

            content = GetRawContent(request);
            _contextProvider.Set(Key, content);

            return(content);
        }
Ejemplo n.º 3
0
        public async Task <IActionResult> Get(string param, CancellationToken ct)
        {
            var result = await PeopleService.SearchPeople(RequestContextProvider.Get(ct), param);

            return(Ok(result));
        }