예제 #1
0
 /// <summary>
 /// Enables CORS for this account for all (*) endpoings
 /// </summary>
 /// <param name="account"></param>
 public static void SetCorsForAll(this CloudStorageAccount account)
 {
     account.SetCorsProperties(cors =>
     {
         var wildcardRule = new CorsRule()
         {
             AllowedMethods = CorsHttpMethods.Get | CorsHttpMethods.Head, AllowedOrigins = { "*" }
         };
         cors.CorsRules.Clear();
         cors.CorsRules.Add(wildcardRule);
         return(cors);
     });
 }