tweedegolf / storage-abstraction

Provides an abstraction layer for interacting with a storage; the storage can be local or in the cloud.
MIT License
106 stars 18 forks source link

Default Azure blob domain should be overridable #68

Closed the8tre closed 2 months ago

the8tre commented 2 months ago

I tried to connect to my cloud Azure blob given the connection parameters I get from my provider, which looks like the following:

{
  "account_name": "abcdefghijklht0s",
  "container_name": "whatfg-llmm-8b503226-27ee-41d1-8bd6-f87908b2e767-jkl",
  "container_uri": "https://abcdefghijklht0s.x33.blob.storage.azure.net/whatfg-llmm-8b503226-27ee-41d1-8bd6-f87908b2e767-jkl",
  "region": "westeurope",
  "sas_token": "somenicesastoken",
}

I noticed that when dealing with a SAS Token the lib enforces an hardcoded value for the azure blob domain .blob.core.windows.net: https://github.com/tweedegolf/storage-abstraction/blob/dd7fafaed0c4586af67e35ef4259ab76541feb41/src/AdapterAzureBlob.ts#L90-L100

I can make a PR to handle this hardcoded behavior and let any custom domain to be used but I'd like first to discuss on what can be the best way to go ?:

What's your take on this ? Thanks !

abudaan commented 2 months ago

Thanks!