Skip to content

Instantly share code, notes, and snippets.

@stefangordon
Created September 12, 2016 15:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stefangordon/e1047158699f1c7464782e28b860aacf to your computer and use it in GitHub Desktop.
Save stefangordon/e1047158699f1c7464782e28b860aacf to your computer and use it in GitHub Desktop.
public static void SetWildcardCorsOnBlobService(this CloudStorageAccount storageAccount)
{
storageAccount.SetCORSPropertiesOnBlobService(cors =>
{
var wildcardRule = new CorsRule() { AllowedMethods = CorsHttpMethods.Get, AllowedOrigins = { "*" } };
cors.CorsRules.Clear();
cors.CorsRules.Add(wildcardRule);
return cors;
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment