Allow hinting correct schema and hostname for Azurite container
Problem
If an Azurite container is running with HTTPS support, the automatic detection logic can't connect to it
Desired Solution
I'd like to be able to hint (either via well known environment variables or container labels) the appropriate schema and address to use to connect to Azurite in a container
Alternatives and Workarounds
No response
Additional Context
No response
I'm actively working on adding the ability to configure individual resources (such as Azurite containers) with HTTPS support, either via the ASP.NET development certificate or a custom user provided certificate. Storage Explorer currently assumes that container endpoints are always http://127.0.0.1, but that may not be valid in all cases anymore (may need to use https://localhost for certificates such as the .NET dev cert). Ideally I could add hints to the container itself via some well known config properties that could be retrieved when inspecting the container. That would allow the explorer to use the values from the container if present (otherwise falling back to http://127.0.0.1).
We used localhost not too long ago, but I seem to recall that it did not work well.
I've found that the .NET Storage SDK does NOT like localhost (it assumes anything that isn't an IP address MUST be a custom storage domain and tries to parse it as such).
I'd still like to be able to at least hint at https vs http via some mechanism to allow lighting up HTTPS automatically when possible.
If you are using HTTPS, you need to pass a --cert option to Azurite with the certificate file. These args are preserved in the container inspect data, which we already query for port info and custom accounts. So if we see the presence of that option, we can reasonably assume HTTPS is in use.
Yeah, that would be a clean way to detect things since it would "just work" if someone manually setup a container for certificates.