Fix dev server not listening on 127.0.0.1

Vite's default host resolves "localhost" to the IPv6 loopback (::1)
on this machine, so it never actually bound 127.0.0.1 -- but that's
the exact address Supabase Auth's email confirmation links redirect
to (config.toml uses 127.0.0.1 throughout). Binding explicitly to
127.0.0.1 fixes confirmation links without needing to hand-edit them.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017DUU6CnxECCDeqDNYJgr5x
This commit is contained in:
2026-09-06 23:04:07 -05:00
co-authored by Claude Sonnet 5
parent 1ae967c8a4
commit 5e8b09f6e2
+7
View File
@@ -8,7 +8,14 @@ export default defineConfig({
// Pinned (rather than Vite's default floating port) so local Supabase
// Auth's redirect allow-list (supabase/config.toml) stays valid instead of
// silently breaking if 5173 happens to be busy and Vite picks another one.
// Host is explicit too: Vite's default "localhost" resolves to the IPv6
// loopback (::1) on this machine, so it never actually listens on
// 127.0.0.1 — but that's exactly the address Supabase Auth's email
// confirmation links redirect to (config.toml uses 127.0.0.1 throughout,
// matching Supabase's own convention). Binding here to 127.0.0.1 instead
// of leaving it to resolve is what makes those links actually work.
server: {
host: '127.0.0.1',
port: 5173,
strictPort: true,
},