Skip to content

Why is the SignalR client(@microsoft/signalr) seems like trying to connect to the root URL instead of only what I supplied? #57479

Answered by engineering87
eSPiYa asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @eSPiYa,
I don't think those wss://localhost and wss://localhost:4200 errors are from SignalR, they’re probraly from the Angular dev server’s HMR client trying to open a WebSocket to refresh the page when code changes.
Since your app is served behind Nginx in Docker and not directly from the dev server, those connections fail but they don’t affect your SignalR hub (which is already connecting fine to /hub/realtimehub).
In a production build, the HMR client isn’t included, so the warnings disappear. You shiuld try to disable the live reload in dev enviroment to test.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by eSPiYa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
area-signalr Includes: SignalR clients and servers
2 participants