예제 #1
0
 public ActionResult Index() {
     if (!Authorized())
         return new HttpUnauthorizedResult();
     var manifest = _merchantDomainAssociationService.Get();
     return View(new MerchantDomainAssociationViewModel() {
         Text = manifest.FileContent,
         Enable = manifest.Enable,
     });
 }
예제 #2
0
        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"));
        }