• Aryan Noshirvnai's avatar
    Fix dev proxy targeting the box's own public IP instead of loopback · 9958e8e1
    Aryan Noshirvnai authored
    vite.config.ts's BACKEND_PROXY_TARGET defaulted to the machine's public IP
    even though vite and the backend always run on the same host - every API
    call round-tripped through Hetzner's network via NAT hairpin instead of a
    plain loopback call. That's the same network path that already caused a
    full outage earlier in this project; it happened to still work here, but
    made every request hostage to cloud routing/firewall behavior it never
    needed to depend on. Default is now 127.0.0.1, override via
    BACKEND_PROXY_TARGET if the backend ever runs elsewhere.
    
    Also documents in .env.example that the dev auto-login token pair is
    inherently one-shot (refresh tokens rotate/single-use) and will go stale on
    its own - that staleness, not this proxy issue, was what actually produced
    "pages take very long to load" (two dead round trips - /auth/me,
    /auth/refresh - before bouncing to /login on every fresh page load).
    Co-Authored-By: 's avatarClaude Sonnet 5 <noreply@anthropic.com>
    Claude-Session: https://claude.ai/code/session_019i3NAUkLkHNbsPg5vKfzF9
    9958e8e1
.env.example 2.19 KB