コード例 #1
0
        public async Task <IActionResult> Get(string segment)
        {
            RedirectResponse response = await _itemBusiness.NavigatesAsync(new RedirectRequest
            {
                Segment   = segment,
                IpAddress = HttpContext.Connection.RemoteIpAddress.ToString()
            });

            if (response.IsSuccess)
            {
                return(Redirect(response.OriginUrl));
            }

            return(BadRequest(response.Message));
        }