A community based topic aggregation platform built on atproto
at main 42 lines 1.0 kB view raw
1# Coves Web Development Reverse Proxy 2# Combines Vite frontend (5173) and Coves backend (8081) on single origin (8080) 3# This enables OAuth cookies to work correctly across frontend/backend 4# 5# Usage: 6# make web-dev # Starts proxy (also starts dev stack if needed) 7# Or manually: caddy run --config Caddyfile.dev 8# 9# Access at: http://localhost:8080 10 11:8080 { 12 # OAuth routes -> Coves backend 13 handle /oauth/* { 14 reverse_proxy 127.0.0.1:8081 15 } 16 17 # XRPC API routes -> Coves backend 18 handle /xrpc/* { 19 reverse_proxy 127.0.0.1:8081 20 } 21 22 # OAuth client metadata -> Coves backend 23 handle /oauth-client-metadata.json { 24 reverse_proxy 127.0.0.1:8081 25 } 26 27 # Image proxy routes -> Coves backend 28 handle /img/* { 29 reverse_proxy 127.0.0.1:8081 30 } 31 32 # Go backend API routes -> Coves backend 33 # Only route Go-specific endpoints here; SvelteKit owns /api/auth/* and /api/proxy/* 34 handle /api/me { 35 reverse_proxy 127.0.0.1:8081 36 } 37 38 # Everything else -> Vite dev server (frontend) 39 handle { 40 reverse_proxy localhost:5173 41 } 42}