Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
Description
Azurite provides a local Azure-compatible endpoint for purposes of testing without requiring network traffic or incurring costs on Azure.
Currently while it is possible to define a custom endpoint this is not respected.
In both
The `storageUrl` is hard-coded to the Azure location
this.storageUrl = URI.create("https://" + creds.get().identity + ".blob.core.windows.net/");
This should be made to respect a custom endpoint if configured, e.g.
BlobStoreContext context = ContextBuilder.newBuilder("azureblob") .credentials(storageAccountName, storageAccountKey) .endpoint("http://localhost:10000") .buildView(BlobStoreContext.class);
In addition, similar to the AWS S3 connector (`enableVirtualHostBuckets`), a configurable property should be provided to change the format of the URLs used by Azure to include the storage account name in the path.
Azure endpoint URL format (storage account in hostname)
https://devstoreaccount1.blob.core.windows.net/
Azurite endpoint URL format (storage account in path)
http://localhost:10000/devstoreaccount1/