/// <summary> /// Executes after action method execution to set script nonce /// </summary> /// <param name="context">ActionExecutedContext</param> /// <method>OnActionExecuted(ActionExecutedContext context)</method> public override void OnActionExecuted(ActionExecutedContext context) { var controller = context.Controller as Controller; _StyleNonce = Nonce.Calculate(); _ScriptNonce = Nonce.Calculate(); controller.ViewBag.StyleNonce = _StyleNonce; controller.ViewBag.ScriptNonce = _ScriptNonce; controller.ViewBag.reCAPTCHA_SiteKey = _appSettings.Authentication.reCAPTCHA.SiteKey; base.OnActionExecuted(context); }