Open cgillum opened 1 year ago
Hi @cgillum.
As an alternative, we could consider making the host address configurable via an environment variable.
Thanks for the response @ondmal.
Do you have any proposal for the environment variable name?
Just throwing this out there, but how about DAPR_HOST
?
Do you still want to use localhost if the environment variable is not defined?
Yes, the switch to localhost solves the immediate blockers that I'm running into more easily than an environment variable would.
I do not know the system well, so I can´t say what is already reserved. But DAPR_HOST
looks good to me.
EDIT: Looks like DAPR_HOST
is good fit, since it is already used in the code base:
https://github.com/search?p=1&q=org%3Adapr+DAPR_HOST&type=Code
but it is missing here in docs: https://docs.dapr.io/reference/environment/
Describe the proposal
Currently we use
127.0.0.1
when accessing the Dapr sidecar from the .NET SDK. This is hardcoded here. We should change this to instead belocalhost
because:127.0.0.1
only works with IPv4 whereaslocalhost
works with both IPv4 and IPv6.localhost
, using127.0.0.1
can't resolve to local WSL2 endpoints from the Windows OS, which is a hindrance for local dev/test on Windows.As an alternative, we could consider making the host address configurable via an environment variable.