public ActionResult Index() { if (!Authorized()) return new HttpUnauthorizedResult(); var manifest = _merchantDomainAssociationService.Get(); return View(new MerchantDomainAssociationViewModel() { Text = manifest.FileContent, Enable = manifest.Enable, }); }
public ActionResult Index() { var content = _cacheManager.Get("MerchantDomainAssociation.Settings", ctx => { ctx.Monitor(_signals.When("MerchantDomainAssociation.SettingsChanged")); var merchantDomainAssociationFile = _merchantDomainAssociationService.Get(); return(merchantDomainAssociationFile); }); if (!content.Enable) { return(new HttpNotFoundResult()); } return(File(Encoding.UTF8.GetBytes(content.FileContent ?? ""), contentType, "apple-developer-merchantid-domain-association")); }