:7860 { # Logs log { output stdout format console } # API Backend - strip /api prefix handle_path /api/* { reverse_proxy localhost:8000 } # Direct backend routes (health, docs, openapi) handle /health/* { reverse_proxy localhost:8000 } handle /v1/* { reverse_proxy localhost:8000 } handle /docs { reverse_proxy localhost:8000 } handle /openapi.json { reverse_proxy localhost:8000 } # Frontend Next.js (everything else) handle { reverse_proxy localhost:3000 } }