public ActionResult Index() { _siteConfiguration.UpdateSecureMode(Request); var viewModel = new BaseViewModel() { SecureMode = _siteConfiguration.SecureMode }; return View(viewModel); }
public ActionResult Index(string url) { _siteConfiguration.UpdateSecureMode(Request); var viewModel = new BaseViewModel() { SecureMode = _siteConfiguration.SecureMode }; var redirectResponse = _redirectProvider.ProcessRedirection(url); // Redirect client to requested url if allowed if (redirectResponse.Allowed) return Redirect(redirectResponse.Url.ToString()); // Else return the error viewModel.ErrorText = redirectResponse.ErrorMessage; return View(viewModel); }