dotnet / dotnet/aspnetcore

Use hot reload with ws only

Open
#55,190 1 comment 4 reactions 0 assignees View on GitHub
area-commandlinetools feature-hot-reload
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 6h
Merged PRs (30d)
290

Description

Originally from [SO](https://stackoverflow.com/q/78344596/9971404), without resolution.

Hot reload [tries to connect](https://github.com/dotnet/sdk/blob/release/7.0.2xx/src/BuiltInTools/BrowserRefresh/WebSocketScriptInjection.js#L15) with two websockets: `wss`, and if that fails, `ws`.

The ws connection succeeds and hot reload works. But I'm not using HTTPS in my local development environment, so the wss connection fails and the script always spams my devtools console with:
```
Firefox can’t establish a connection to the server at wss://localhost:50005/.
WebSocket failed to connect.
```

That is very annoying. Please allow us to configure hot reload to use `ws` only.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.