| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
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
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.
Sorry, something went wrong.
|
@yuchenshi Will this be good? |
Sorry, something went wrong.
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';
} |
Sorry, something went wrong.
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
|
This will be included in the next release. Cheers! |
Sorry, something went wrong.
|
Great! Thanks @yuchenshi . Cheers! |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
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