redocly-cli icon indicating copy to clipboard operation
redocly-cli copied to clipboard

Preview docs using localhost instead of 127.0.0.1

Open colinmollenhour opened this issue 3 years ago • 3 comments

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

colinmollenhour avatar Nov 17 '21 17:11 colinmollenhour

The hot reloading websocket url would also need to be updated: image

colinmollenhour avatar Nov 17 '21 17:11 colinmollenhour

Hi @colinmollenhour, Sorry for the slow response 😅 It should be fixed. Could check it on your end?

IgorKarpiuk avatar Jul 24 '23 13:07 IgorKarpiuk

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. image image

colinmollenhour avatar Jul 26 '23 15:07 colinmollenhour