Commit a9ad07a
Fix watch hot-reload WebSocket to use window.location.host instead of hardcoded localhost
The injected WebSocket URI was hardcoded as ws://localhost:<port>/websocket,
which breaks in GitHub Codespaces, behind reverse proxies, and over HTTPS.
Now uses window.location.host (which includes the correct hostname and port)
with the appropriate ws:/wss: protocol to match the page's scheme.
Removes the now-unused port parameter from generateWatchScript.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent e8d7a4e commit a9ad07a
2 files changed
Lines changed: 6 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
819 | 819 | | |
820 | 820 | | |
821 | 821 | | |
822 | | - | |
823 | | - | |
824 | | - | |
| 822 | + | |
| 823 | + | |
825 | 824 | | |
826 | | - | |
| 825 | + | |
| 826 | + | |
827 | 827 | | |
828 | 828 | | |
829 | 829 | | |
| |||
850 | 850 | | |
851 | 851 | | |
852 | 852 | | |
853 | | - | |
854 | | - | |
855 | 853 | | |
856 | 854 | | |
857 | 855 | | |
| |||
1879 | 1877 | | |
1880 | 1878 | | |
1881 | 1879 | | |
1882 | | - | |
| 1880 | + | |
1883 | 1881 | | |
1884 | 1882 | | |
1885 | 1883 | | |
| |||
0 commit comments