redocly-cli
redocly-cli copied to clipboard
Preview docs using localhost instead of 127.0.0.1
Describe the bug
When running a web server via WSL only localhost
works, 127.0.0.1
does not reach the ports opened by WSL apps. The link generated by preview-docs
uses http://127.0.0.1:8080
but for WSL users this should be http://localhost:8080
.
To Reproduce
Run openapi preview-docs
via Node installed on Windows Subsystem for Linux and click the link: ERR_CONNECTION_REFUSED
Expected behavior Clicking the link provided by the CLI opens the docs successfully.
openapi-cli
Version(s)
1.0.0-beta-69
The hot reloading websocket url would also need to be updated:
Hi @colinmollenhour, Sorry for the slow response 😅 It should be fixed. Could check it on your end?
Spoke too soon.. The link is still 127.0.0.1 and websockets still don't work. It works if the url is changed to localhost.