live-server icon indicating copy to clipboard operation
live-server copied to clipboard

Use specific URL for the reload web socket

Open garyb opened this issue 4 years ago • 0 comments

I'm using live-server to serve static files and then have it proxying an API also, that API has a web socket endpoint, but it's unreachable at the moment as any web socket connection attempts made to the live-server will be grabbed by the reload socket.

This PR gives the reload socket endpoint in the injected code a slightly less generic name (in the hopes of avoiding potential overlaps) and adds a check to only connect the reload handling stuff if the request matches the name, allowing middleware or other things to pick up other socket requests as necessary.

garyb avatar Aug 06 '19 11:08 garyb