Ejemplo n.º 1
0
        private IActionResult RedirectToOrigin(string origin, bool allowExternalRedirect = false)
        {
            var returnUrl = _cypher.Decypher(origin);

            if (Url.IsLocalUrl(returnUrl) || allowExternalRedirect)
            {
                return(Redirect(returnUrl));
            }
            else
            {
                return(RedirectToAction(nameof(HomeController.Index), "Home"));
            }
        }