Repository navigation
#286: Emulator UI should not connect to 0.0.0.0 for emulators - #312
Conversation
Description:
- Added check whether info.host is not 0.0.0.0 or ::
- If it is present, then update the host with localhost else it remains same
- Pass the new value to hostAndPort
yuchenshi
left a comment
There was a problem hiding this comment.
Thanks for the contribution! This looks good, but one small nit: please use 127.0.0.1 for IPv4 and ::1 for IPv6 instead of localhost.
The reason is that localhost may be mapped to both on the hosts file and may differ on each device. IP addresses are more direct and uniformly handled.
|
@yuchenshi Will this be good? |
That is logically correct, but for let's stay away from chained ternaries for clarity. I suggest: let host = info.host;
if (host === '0.0.0.0') {
host = '127.0.0.1';
} else if (host === '::') {
host = '::1';
} |
Description:
- Added check whether info.host is not 0.0.0.0 or ::
- If it is present, then update the host with localhost else it remains same
- Pass the new value to hostAndPort
|
@yuchenshi Okay 😁 |
|
This will be included in the next release. Cheers! |
|
Great! Thanks @yuchenshi . Cheers! |
Description:
- Added check whether info.host is not 0.0.0.0 or ::
- If it is present, then update the host with localhost else it remains same
- Pass the new value to hostAndPort