mirror of
https://github.com/jhd3197/ServerKit.git
synced 2026-11-01 01:27:16 +09:00
dev.sh started Vite on 127.0.0.1 — WSL's own loopback, not the one the browser on Windows talks to. That only ever worked because WSL2 forwards localhost, and when that forwarding silently stops the app becomes unreachable while the backend, already bound to 0.0.0.0, keeps answering on the WSL IP. Half the stack responding and half refusing, with no error anywhere, is a miserable thing to debug. Under WSL the frontend now binds all interfaces, so the WSL IP always works regardless of forwarding, and the banner prints that URL instead of a localhost one that may not resolve. Both loopback spellings stay in CORS so localhost keeps working whenever forwarding is up, and non-WSL setups still bind 127.0.0.1 exactly as before. SERVERKIT_FRONTEND_BIND overrides the choice. WSL networking is NAT'd behind the Windows host, so this does not put the dev server on the LAN. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>